Am 05.01.2012 15:03, schrieb Florian Klämpfl:
Am 05.01.2012 14:19, schrieb Sven Barth:
procedure TMyClass<T>.SomeMethod;
var
V: T;
begin
...
Finalize(V);
FillChar(V, SizeOf(V), 0);
...
end;
which is equivalent but it doesn't look too elegant. I am using FPC
2.7.1 for Win32/64.
For now you'll need to use this workaround solution.
Has the workaround really the same effect? I really wonder why there is
a need for default then ...
It should at least be sufficent for the most common cases:
* ordinals
* strings
* classes
* records (and objects)
I don't know about Variants though. The Delphi help isn't helping either ;)
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal