AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Memory Manager in Delphi 2007

Ein Thema von FaNIX · begonnen am 4. Feb 2008 · letzter Beitrag vom 4. Feb 2008
Antwort Antwort
FaNIX

Registriert seit: 8. Okt 2007
36 Beiträge
 
#1

Memory Manager in Delphi 2007

  Alt 4. Feb 2008, 09:46
Does anyone know if Delphi 2007 has it's own memory manager?

I want to check my application for memory leaks, so i wish to report all memory leaks when i close my application. Any help?


PS: I know the ReportMemoryLeaksOnShutdown works for Win32 Applications in Delphi2007, but im using a VCL.NET Application.

Thanks
  Mit Zitat antworten Zitat
Benutzerbild von Khabarakh
Khabarakh

Registriert seit: 18. Aug 2004
Ort: Brackenheim VS08 Pro
2.876 Beiträge
 
#2

Re: Memory Manager in Delphi 2007

  Alt 4. Feb 2008, 10:09
There's no such thing as a memory leak in a (fully managed) .Net application. If you're experiencing some memory issues, could you describe them?
Whenever you have created, say, 20 new objects (i.e. generation 0 is full) since the last garbage collection, the garbage collector will reclaim any unreferenced objects (slightly simplified). The only thing you can do to help the GC is to dispose every IDisposable object as soon as you don't need it anymore.
Sebastian
Moderator in der EE
  Mit Zitat antworten Zitat
FaNIX

Registriert seit: 8. Okt 2007
36 Beiträge
 
#3

Re: Memory Manager in Delphi 2007

  Alt 4. Feb 2008, 10:39
Zitat von Khabarakh:
There's no such thing as a memory leak in a (fully managed) .Net application. If you're experiencing some memory issues, could you describe them?
Whenever you have created, say, 20 new objects (i.e. generation 0 is full) since the last garbage collection, the garbage collector will reclaim any unreferenced objects (slightly simplified). The only thing you can do to help the GC is to dispose every IDisposable object as soon as you don't need it anymore.

mmm ok, so if i do the following:

Delphi-Quellcode:
procedure TForm3.FormCreate(Sender: TObject);
begin

  oConn := TADOConnection.Create(nil);

end
in a VCL.NET Application, then that object will automaticly be disposed? So there is no need to FeeAndNil(oConn)?

Thanks
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:16 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz