Sorry, i didnt put it clearly. I meant:
A
Code:
type
abc=class
procedure zzz;
...
end;
B
Code:
type
abc=object
procedure zzz;
...
end;
C
Code:
type
abc=record
procedure zzz;
...
end;
You have to debugger dissassemble A to make sure it works out ok if it frees itself.
You can have B free itself in FPC, but not in delphi, since this type is buggy in delphi.
You can have C free itself in delphi 2006+turbo delphi (turbo delphi=delphi2006), but not FPC (i believe, havent tried it in a while).
In all cases, you also have to make sure to not access any fields/methods of your stucture once it has freed itself.
Hope this clears the confusion
Bookmarks