If I have a class descending directly from TObject, is it necessary for the constructor and destructor to call the inherited methods, since as far as I know they do not actually do anything?
If I have a class descending directly from TObject, is it necessary for the constructor and destructor to call the inherited methods, since as far as I know they do not actually do anything?
[size=10px][ Join us in #pgd on irc.freenode.net ] [ Sign the Petition for a Software Patent Free Europe ][/size]
No, i shouldnt think you need to. The constructor and destructor for TObject are empty so i wont make any difference if you called it or not..
M109uk
<br />--------------------------------------------------------
<br />www.pulse-soft.oneuk.com
Yep, the base constructor and destructor for TObject don't do anything. However, I'd advise you to include an "inherited" for the sake of consistency -- you may decide to derive them from another common base class at some point (e.g. "TGenericGameObject" or whatever), at which point you may end up forgetting to call its constructor or destructor due to missing inherited...
Keep in mind that you can always remove the calls once you've finished the game.
"All paid jobs absorb and degrade the mind."
<br />-- Aristotle
Bookmarks