Crystal Space
Welcome, Guest. Please login or register.
December 20, 2014, 02:48:41 am

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9292 Members
Latest Member: Agaqkopa
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  iObjectRegistry not destructing
« previous next »
Pages: [1] Print
Author Topic: iObjectRegistry not destructing  (Read 2121 times)
muffinpeddler
Full Member
***
Posts: 122


View Profile Email
« on: October 22, 2005, 05:41:35 pm »

I am having a problem with my iObjectRegistry not getting destroyed when my application closes.  I have tried multiple ways to get the thing deleted, but it is always non-null at the end of the main application constructor, even after calls to csInitializer::DestroyApplication(objectRegistry); or the plain delete operator. 

My main application class extends from csApplicationFramework and this is how I start it:

Code:
   
    TerraClientContext cc;
    return cc.Main(argc, argv);

I fear memory leaks here...Any ideas?
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: October 22, 2005, 06:12:27 pm »

I am having a problem with my iObjectRegistry not getting destroyed when my application closes.  I have tried multiple ways to get the thing deleted, but it is always non-null at the end of the main application constructor, even after calls to csInitializer::DestroyApplication(objectRegistry); or the plain delete operator. 

My main application class extends from csApplicationFramework and this is how I start it:

Code:
   
    TerraClientContext cc;
    return cc.Main(argc, argv);

I fear memory leaks here...Any ideas?

Of course it is not null. Why would that variable be set to null? Don't worry about it. It is just a variable that is still set. The object registry itself is destroyed.

Greetings,
Logged
muffinpeddler
Full Member
***
Posts: 122


View Profile Email
« Reply #2 on: October 22, 2005, 07:01:59 pm »

Oh, I wasn't talking about my cc variable, rather the destruction of iObjectRegistry from csApplicationFramework.  I showed that to show you how I was using the framework class.  In the destructor of my framework controller class, even after calls to destroy application and/or delete, a call to CS_ASSERT(objectRegistry == NULL) fails no matter what.  Are we talking about the same thing here?
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: October 22, 2005, 07:23:23 pm »

Oh, I wasn't talking about my cc variable, rather the destruction of iObjectRegistry from csApplicationFramework.  I showed that to show you how I was using the framework class.  In the destructor of my framework controller class, even after calls to destroy application and/or delete, a call to CS_ASSERT(objectRegistry == NULL) fails no matter what.  Are we talking about the same thing here?

I'm talking about the same thing. Why would that objectRegistry variable be set to NULL? I don't understand how you would come to that. Nothing in CS will set that to NULL.

Greetings,
Logged
muffinpeddler
Full Member
***
Posts: 122


View Profile Email
« Reply #4 on: October 24, 2005, 03:52:08 am »

Ah duh, I don't know why I was asking that.  I know more than to ask that...
Thanks for putting up with my stupidity.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 2.308 seconds with 14 queries.