On 24 Apr 2012, at 16:50, Curtis Olson wrote:

> If an FGAirport object was ref-counted and deleted because the ref-count went 
> to zero, then why would  FGAirport::findClosest() still be returning a 
> pointer to it it as the closest airport?  Is it not getting fully/properly 
> deleted or removed from the list and you just getting lucky on the Mac that 
> it's not segfaulting?

As far as the FGPositioned Octree is concerned (which is what findClosest uses 
internally), it's holding an owning ref and hence things can't be removed from 
it, for the moment.

So what I guess is happening, is that I'm breaking the ref-counting scheme 
*somehow*, and hence the Octree is left holding a dead reference as you say. 
And somehow how I get away with this on Mac.

But this feels a little implausible, since in other similar scenarios the Mac 
crashes quite happily!

James


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to