what is the opposite of init (initialize)

Started by
55 comments, last by Ilici 18 years, 11 months ago
I don't de-initialize anything. I just pray that my OS cleans up any memory leaks that I leave behind.

murder() would also be nice BTW.
STOP THE PLANET!! I WANT TO GET OFF!!
Advertisement
Quote:Am I the only person who uses the constructor and destructor to do these things for me?

Most of the time, you can. There are circumstances however when a seperate Initialize() function makes sence, and indeed, when it's the only way to do certain things.
Quote:Original post by furby100
Am I the only person who uses the constructor and destructor to do these things for me?


You can't always rely on the constructor, particularly virtual function calls.

Besides, sometimes, you want to re-initialise an object (another one for the books) without destroying it.

Everything is better with Metal.

Singletons are also another case where an Initialize method might be required.
Object.StrikeDownWithGreatVengance();

Actually, I use Initialize() and Shutdown(), with the occasional Kill().
- [email=atronic@gamebox.net]Alex Broadwin[/email]- Adroit Creations- My Journal- The All-Knowing One
Quote:Original post by oliii
Quote:Original post by furby100
Am I the only person who uses the constructor and destructor to do these things for me?


You can't always rely on the constructor, particularly virtual function calls.

Besides, sometimes, you want to re-initialise an object (another one for the books) without destroying it.


It also lets you have better control over when the object is initialized.

Hm.. I always thought initialize/shutdown were correct. But this thread has me thinking that over [grin]
Quote:Original post by gcs584
Quote:Original post by benryves
Quote:Original post by ScootA
isn't it
What do you call a pikey in a box?
Innit!


Unfortunatley, I highly doubt whether someone from outside the UK would be able to appreciate your joke [smile]

GCS584


Have they even invented chavs in guildford yet? :)
-Scoot
I tend to have void Free(). Often I have destructors that just call Free(), which allows you to choose to Free() earlier, or just wait for destruction.
Quote:Original post by Nice Coder
Quote:Original post by Feral
By the by


?

Would you mind explaining?

From,
Nice coder

Expression.
Quote:From Dictionary.com
Idiom:
by the bye/by

By the way; incidentally.


(=
Quote:Original post by Genjix
The thing I always have trouble with is choosing appropriate names for my classes (Entity or Object?). There should be like a standard list of names somewhere that would therefore aid in code readability (if everyone knew the standard name for something).


I'm going to start a new topic on the game programming wiki on "standard game object names".
Does anyone think its worth it?

This topic is closed to new replies.

Advertisement