weak_ref issue patch
Max McGuire <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
I've attached a patch to weak_ref which fixes the issue I previously mentioned. The fix turned out to be fairly straight forward: I added an additional table to store the impl part of the weak_ref. This table is used with lua_ref so that the "id" will be unique to the weak_ref regardless of whether or not the value in the weak table has been removed or collected. This prevents the same id from being used by two weak_refs at the same time, which previously could result in the Lua portion of a wrap_base derived class from being lost or aliased by another object. Max -- Technical Director Unknown Worlds Entertainment http://www.unknownworlds.com ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ luabind-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luabind-user
weak_ref.cpp
(application/octet-stream, 4.3 KB) - not displayed