[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Resurrecting Objects
- From: Marc Lepage <mlepage@...>
- Date: Tue, 12 Nov 2013 11:00:26 -0500
Yeah, I could see it happening that way, but I don't know if that's how it actually works.
That would be convenient for me. Create a table entry (light to full) when full is first created; any subsequent access by light userdata gets the same existing full userdata (via that table), and when all references go away, the full userdata is "collectible". If the table is weak, it will be cleaned up when the full userdata is collected. But in the meantime, any new access by light userdata would try to return the same full userdata (which is "collectible"). Is this a problem?
Basically, I'm trying to ensure there can only ever be one full userdata per particular C++ object. (Because that would simplify a lot.)