Summary: C#/.NET is supposed to be garbage collected. C# has a destructor, used to clean resources. What happen when an object A is garbage collected the same line I try to clone one of its variable members? Apparently, on multiprocessors, sometimes, the garbage collector wins...
The problem
Today, on a training session on C#, the teac...
Hi all,
Is there any way to scan through a asp.net code base and figure out which object is finalizable? I am asking since I am trying get object away from the finalization queue to improve performance.
...
Section 10.13, Destructors, of the C# Language Specification 3.0 states the following:
Destructors are not inherited. Thus, a class has no destructors other than the one which may be declared in that class.
The Destructors section of the C# Programming Guide contains an example demonstrating how destructors in an inheritance hierar...
I have two units unitA and unitB.
Class TFoo is declared in unitB.
Is it allways safe to call B.Free in finalization of unitA?
How does it depend on in which order unitA and unitB are in dpr?
Can I be sure that unitB exists when unitA finalization is executed?
unit unitB;
interface
type
TFoo = class
// code...
end;
// code.....
I need to execute my code after finalization of SysUtils unit.
I've placed my code in separate unit and included it first in uses clause of dpr-file, like this:
project Project1;
uses
MyUnit, // <- my separate unit
SysUtils,
Classes,
SomeOtherUnits;
procedure Test;
begin
//
end;
begin
SetProc(Test);
end.
MyUnit look...