Board index » delphi » Any memory allocation or Garbage Collection ideas available?
Will Hartung
![]() Delphi Developer |
Sun, 24 Jun 2001 03:00:00 GMT
|
Will Hartung
![]() Delphi Developer |
Sun, 24 Jun 2001 03:00:00 GMT
Any memory allocation or Garbage Collection ideas available?
I'm wondering if anyone is doing anything WRT Garbage Collection in Delphi.
Anyone reference counting, or anything else? How does it work for you, etc. Thanx for any pointers. Will Hartung |
Martin Harve
![]() Delphi Developer |
Wed, 27 Jun 2001 03:00:00 GMT
Re:Any memory allocation or Garbage Collection ideas available?Have a look at TComponent.Create and TComponent.Destroy for one possibility. In order to do more powerful garbage collection, you'd probably need to modify the compiler. MH. QuoteWill Hartung wrote: Martin Harvey. Totally rewritten web pages at: http://www.harvey27.demon.co.uk/mch24/ "ALGOL 60 was a language so far ahead of its time that it --------------BEGIN GEEK CODE BLOCK-------------- |
Lasse V?gs?ther Karls
![]() Delphi Developer |
Fri, 29 Jun 2001 03:00:00 GMT
Re:Any memory allocation or Garbage Collection ideas available?On Sat, 09 Jan 1999 16:59:49 +0000, Martin Harvey Quote<mar...@aziraphale.demon.co.uk> wrote: and replace the standard memory manager that Delphi uses, so you *could* probably add some garbage collection to your program. I've used the replace technique to create a leak-detection unit. |
gden..
![]() Delphi Developer |
Fri, 06 Jul 2001 03:00:00 GMT
Re:Any memory allocation or Garbage Collection ideas available?In article <36978B05.5AE87...@aziraphale.demon.co.uk>, Martin Harvey <mar...@aziraphale.demon.co.uk> wrote: Quote> Will Hartung wrote: Strings) I discovered that Object Interfaces (Object Pascal extension in v3.0) implements referencing counting for objects accessed entirely through their interfaces using TInterfacedObject (default implementation available for the minimum Interface IUnknow). I am still learning Delphi and am trying to convert my current class to be a The problem is (there is always a problem), I don't know how to create the Has anyone travelled down this road before? -----------== Posted via Deja News, The Discussion Network ==---------- |
Laurent Martell
![]() Delphi Developer |
Fri, 06 Jul 2001 03:00:00 GMT
Re:Any memory allocation or Garbage Collection ideas available?Quotegden...@my-dejanews.com writes: class (TCustomer in my example). You can have very tricky problems if you mix reference counted variables and non-reference counted variables. That's why Get_Name is protected : this way you are less tempted to have a vairable of type TCustomer since you wouldn't be able to use for anything. ICustomer = interface TCustomer = class(TInterfacedObject, ICustomer) . Regards |
Stefan Hoffmeist
![]() Delphi Developer |
Fri, 06 Jul 2001 03:00:00 GMT
Re:Any memory allocation or Garbage Collection ideas available?Quote: gden...@my-dejanews.com wrote: MyInterface = interface [...] end; type var The "as MyInterface" part above is redundant and only for clarity. Please have a look at the online help - that describes everything -- |
Cameron McCormac
![]() Delphi Developer |
Fri, 06 Jul 2001 03:00:00 GMT
Re:Any memory allocation or Garbage Collection ideas available?Similarly, i don't have much experience with interfaces, but I think that you have to have what's known as a "class factory" to instantiate the interface. Have a look in the help file, and it might explain it further. Cameron Quotegden...@my-dejanews.com wrote in message Quote>In article <36978B05.5AE87...@aziraphale.demon.co.uk>, |
Laurent Martell
![]() Delphi Developer |
Fri, 06 Jul 2001 03:00:00 GMT
Re:Any memory allocation or Garbage Collection ideas available?Quote"Cameron McCormack" <cameronm...@hotmail.com> writes: internally. -- |