EventReceiver Problem :s

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Nils:D
Posts: 24
Joined: Sat Sep 09, 2006 12:35 pm

Post by Nils:D »

I, because if you would give the things that will given free in the destructor free down, then nothing woulb be changed.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, if you read carefully you'll mention that I told you, you shouldn't drop them anywhere... ;)
But yes, I guessed maybe at another place if you really want to, but as far as I couldn't test it...
And the main fact is that I told you the error was (with high probability) the code inside the destructor... ;)
All I did was looking at the code, because I had no chance to make any tests...

Now finally you got it and that's all that counts... :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Nils:D
Posts: 24
Joined: Sat Sep 09, 2006 12:35 pm

Post by Nils:D »

Ok, the code is poop: Wherever i set the destructor things, i must see a execption. And if i got it right i must not free it, right ?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Well, the real problem with the code is that it's not documented...
This makes it prety hard to read for other people beside you !!!
Because you wrote the code you can read it easily... ;)

And for testings the code should compile and run, what your uploaded code doesn't (ok, I know you have not enough web space ;) )...

What made me really confused about this two pointers is, that I didn't find the initialisations of them and don't know what they are for !?!?!
I can't remember but I think you also didn't set the pointers to 0 (or NULL) at the beginning...
If you don't initialise a pointer it will not set to 0 when creating it, it will have a undefined value (maybe this is the error with this) !!!

As I mentioned I had similar problems with the destructor...
And now I don't do such Irrlicht stuff in the destructor anymore... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply