Skip to content

Fixed lqt slot acceptor issues#10

Open
duerrpADA wants to merge 1 commit intolqt5:qt5from
duerrpADA:fix-lqt-slot-acceptor
Open

Fixed lqt slot acceptor issues#10
duerrpADA wants to merge 1 commit intolqt5:qt5from
duerrpADA:fix-lqt-slot-acceptor

Conversation

@duerrpADA
Copy link
Copy Markdown

  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
Copy Markdown
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