From 43806a5ca483e8767066d5a7b1e02557056e40bd Mon Sep 17 00:00:00 2001 From: tobigun Date: Fri, 2 May 2008 16:52:53 +0000 Subject: TCoreModule overloads the Free destructor "destructor Free" with a self defined "procedure Free". At least Free should not be defined explicitly because there already is a default Free() implementation that checks if the reference is nil and if not, calls Destroy. Making the destructor a procedure does not look correct too. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1054 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UCoreModule.pas | 4 ++-- Game/Code/Classes/UDataBase.pas | 6 +++--- Game/Code/Classes/ULyrics.pas | 6 +++--- Game/Code/Classes/UParty.pas | 4 ++-- Game/Code/Classes/uPluginLoader.pas | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'Game') diff --git a/Game/Code/Classes/UCoreModule.pas b/Game/Code/Classes/UCoreModule.pas index c8c54161..a7ad3b4e 100644 --- a/Game/Code/Classes/UCoreModule.pas +++ b/Game/Code/Classes/UCoreModule.pas @@ -47,7 +47,7 @@ type //Is Called if this Module will be unloaded and has been created //Should be used to Free Memory - Procedure Free; virtual; + Destructor Destroy; override; end; cCoreModule = class of TCoreModule; @@ -118,7 +118,7 @@ end; //Is Called if this Module will be unloaded and has been created //Should be used to Free Memory //------------- -Procedure TCoreModule.Free; +Destructor TCoreModule.Destroy; begin //Dummy ftw!! end; diff --git a/Game/Code/Classes/UDataBase.pas b/Game/Code/Classes/UDataBase.pas index 3954f92e..f7f39634 100644 --- a/Game/Code/Classes/UDataBase.pas +++ b/Game/Code/Classes/UDataBase.pas @@ -46,7 +46,7 @@ type property Filename: String read sFilename; - Destructor Free; + Destructor Destroy; override; Procedure Init(const Filename: string); procedure ReadScore(Song: TSong); @@ -114,9 +114,9 @@ begin end; //-------------------- -//Free - Frees Database +//Destroy - Frees Database //-------------------- -Destructor TDataBaseSystem.Free; +Destructor TDataBaseSystem.Destroy; begin debugWriteln( 'TDataBaseSystem.Free' ); diff --git a/Game/Code/Classes/ULyrics.pas b/Game/Code/Classes/ULyrics.pas index 38bc1e7a..b542b5f6 100644 --- a/Game/Code/Classes/ULyrics.pas +++ b/Game/Code/Classes/ULyrics.pas @@ -114,7 +114,7 @@ type Constructor Create; overload; Constructor Create(ULX,ULY,ULW,ULS,LLX,LLY,LLW,LLS:Real); overload; Procedure LoadTextures; - Destructor Free; + Destructor Destroy; override; end; implementation @@ -190,9 +190,9 @@ end; //--------------- -// Free - Frees Memory +// Destroy - Frees Memory //--------------- -Destructor TLyricEngine.Free; +Destructor TLyricEngine.Destroy; begin end; diff --git a/Game/Code/Classes/UParty.pas b/Game/Code/Classes/UParty.pas index b0b400db..b7670c67 100644 --- a/Game/Code/Classes/UParty.pas +++ b/Game/Code/Classes/UParty.pas @@ -54,7 +54,7 @@ type Function Load: Boolean; override; Function Init: Boolean; override; Procedure DeInit; override; - Procedure Free; override; + Destructor Destroy; override; //Register Modi Service Function RegisterModi(nothin: TwParam; pModiInfo: TlParam): integer; //Registers a new Modi. wParam: Pointer to TUS_ModiInfo @@ -147,7 +147,7 @@ end; //Is Called if this Module will be unloaded and has been created //Should be used to Free Memory //------------- -Procedure TPartySession.Free; +Destructor TPartySession.Destroy; begin //Just save some Memory if it wasn't done now.. SetLength(Modis, 0); diff --git a/Game/Code/Classes/uPluginLoader.pas b/Game/Code/Classes/uPluginLoader.pas index b018ccc2..cec9d77d 100644 --- a/Game/Code/Classes/uPluginLoader.pas +++ b/Game/Code/Classes/uPluginLoader.pas @@ -53,7 +53,7 @@ type Function Load: Boolean; override; Function Init: Boolean; override; Procedure DeInit; override; - Procedure Free; override; + Destructor Destroy; override; //New Methods Procedure BrowseDir(Path: String); //Browses the Path at _Path_ for Plugins @@ -203,7 +203,7 @@ end; //Is Called if this Module will be unloaded and has been created //Should be used to Free Memory //------------- -Procedure TPluginLoader.Free; +Destructor TPluginLoader.Destroy; begin //Just save some Memory if it wasn't done now.. SetLength(Plugins, 0); -- cgit v1.2.3