TNL returns a "3" when I call my destructors...
by Thomas K. · in Torque Game Engine · 02/16/2008 (3:25 pm) · 0 replies
Hi there,
I am working with TNL for a couple of weeks. It runs all fine. (c++)
But when I close
my program, I get a three instead of a zero.
I checked it, and there are three pointers in my wrapper-class.
2 NetInterface - classes and
1 SimpleConnection - class
When I call my destructor on exit:
if(theNetInterfaceServer != NULL)
theNetInterfaceServer->destroySelf();
theNetInterfaceServer = NULL;
if(theNetInterfaceClient != NULL)
theNetInterfaceClient->destroySelf();
theNetInterfaceClient = NULL;
if(newConnection != NULL)
delete newConnection;
newConnection = NULL;
I get these error number. If I dont delete these pointers (On wich I called 'new'), there are no errors and
the program returns a zero.
My question is:
Does TNL destroys itself, when my wrapper-class destrucs?
And if so: Shouldn't it be no problem to call to delete??
I dont wanna waste memory, so I am used to write a delete for every new.
What should I do now?
The Documentation was not useful and the searchengines can't help me either!
I hope you can understand my problem, since I am german...
Thank you and greetings,
Spunkmeyer
I am working with TNL for a couple of weeks. It runs all fine. (c++)
But when I close
my program, I get a three instead of a zero.
I checked it, and there are three pointers in my wrapper-class.
2 NetInterface - classes and
1 SimpleConnection - class
When I call my destructor on exit:
if(theNetInterfaceServer != NULL)
theNetInterfaceServer->destroySelf();
theNetInterfaceServer = NULL;
if(theNetInterfaceClient != NULL)
theNetInterfaceClient->destroySelf();
theNetInterfaceClient = NULL;
if(newConnection != NULL)
delete newConnection;
newConnection = NULL;
I get these error number. If I dont delete these pointers (On wich I called 'new'), there are no errors and
the program returns a zero.
My question is:
Does TNL destroys itself, when my wrapper-class destrucs?
And if so: Shouldn't it be no problem to call to delete??
I dont wanna waste memory, so I am used to write a delete for every new.
What should I do now?
The Documentation was not useful and the searchengines can't help me either!
I hope you can understand my problem, since I am german...
Thank you and greetings,
Spunkmeyer