Skip to content

Fixed lqt slot acceptor issues #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: qt5
Choose a base branch
from

Conversation

duerrpADA
Copy link

  1. The dynamically created "LqtSlotAcceptor" objects were never deleted. Wrapped it into a unique_ptr to auto-delete them, when the library is unloaded.

  2. When multiple lua_States loaded modules (via "require") from lqt5, the application at some point crashed. The Problem was, that only one global "LqtSlotAcceptor" object is used, which holds the latest lua_State, which loaded the lqt5 module. If then a Slot from a previous lua_State was triggered the global "LqtSlotAcceptor" object accessed the wrong lua_State. To solve this, i changed the global "LqtSlotAcceptor" pointer to a std::map indexed by the "lua_State*" holding an "LqtSlotAcceptor" object for each lua_State to make sure we don´t get such conflicts.

@duerrpADA
Copy link
Author

Whats the status on this?
Are you planing on merging these changes into the project or are there any problems with them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant