Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework


Memory Management Issues on the .NET Platform



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə257/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   253   254   255   256   257   258   259   260   ...   294
DelphiLanguageGuide

Memory Management Issues on the .NET Platform
The .NET Common Language Runtime is a garbage-collected environment. This means the programmer is freed
(for the most part) from worrying about memory allocation and deallocation. Broadly speaking, after you allocate
memory, the CLR determines when it is safe to free that memory. "Safe to free" means that no more references to
that memory exist.
This topic covers the following memory management issues:
Creating and destroying objects
Unit initialization and finalization sections
Unit initialization and finalization in assemblies and packages
Constructors
In Delphi for .NET, a constructor must always call an inherited constructor before it may access or initialize any
inherited class members. The compiler generates an error if your constructor code does not call the inherited
constructor (a valid situation in Delphi for Win32), but it is important to examine your constructors to make sure that
you do not access any inherited class fields, directly or indirectly, before the call to the inherited constructor.

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   253   254   255   256   257   258   259   260   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin