Segmentation fault in simple crystal space program

Started by
9 comments, last by acraig 19 years, 9 months ago
I normally use csRef for anything I grab from CS like iGraphics2D. It is the safest way to prevent memory leaks. The easiest way to check stuff like that is to call

object->GetRefCount() to see how many things are accessing it.

If at the end you keep getting stuff like "Unreleased references" you can use the GetRefCount() to track them down ( painful sometimes ).


The example you show with iSector is ok since it is just a plain pointer so unless you do an IncRef on it you don't need a DecRef.

Edit: Update with correct info :)
---------
Andrew

[Edited by - acraig on July 8, 2004 9:06:28 AM]

This topic is closed to new replies.

Advertisement