||[Jul. 20th, 2000|11:58 pm]
|||||Sublime - Santeria||]|
Perhaps this is the problem.... the reference-counting mechanism on my LJRequest object is used like this:
But the problem is that if the RemoveRef() actually does end up deleting the object, nothing ever nulls out the request object pointer. I need to change the RemoveRef prototype to be like:
LJRequest::RemoveRef (LJRequest *&reqPtr);
That way I can check if it's non-null (instead of the client-code needing to do it), free it, and set it back to NULL when it's actually freed.
None of this would be necessary if I were using Java. Of course, Microsoft doesn't support Java anymore... I supposed I could one day write it in MS-proprietary C# (C-Sharp).. ha!