Re: Crash in wrapper_base.cpp

Nigel Atkinson <[email protected]> Fri, 08 Jul 2011 09:44:28 +1000
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <1310082268.1549.9.camel@virNatty>
On Thu, 2011-07-07 at 11:44 -0700, Drew McLean wrote:
> I don't think that's the case since I'm printing at the point where I
> unregister an object (in a common function).  And there is no loop
> where I release a bunch at once, they each complete in their own time.
> My global table uses the object as the key and the value.  Is there
> something wrong with that?  I can't see why.
> 
>    Drew
I can not think of any reason why using the object as a key would not
work either.

Just had a thought - are the objects that are incorrectly getting
garbage collected actually getting collected (and destructed?), or is it
just the reference held in wrap_base getting zapped?

The reason I say this - is because a made a test program to try and
replicate what is happening in my game, however garbage collecting an
object resulted in destruction and freeing of memory immediately.
Somehow in my game I'm getting to call 'update' when the wrap_base
reference is nil yet the object is still 'alive'.

I'm quite interested in what you may find - seeing as I have a similar
but not quite same problem.

Nigel


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2