lqt icon indicating copy to clipboard operation
lqt copied to clipboard

Fixed lqt slot acceptor issues

Open duerrpADA opened this issue 4 years ago • 1 comments

  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 avatar Jun 18 '20 12:06 duerrpADA

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

duerrpADA avatar Jul 16 '20 12:07 duerrpADA