My predecessor doesn't stop to surprise me with generated useless code.
My predecessor doesn't stop to surprise me with generated useless code.
procedure SomeProcedure;
var SomeObject: TObject;
begin
SomeObject := nil;
SomeObject := TObject.Create;
(...)
procedure SomeProcedure;
var SomeObject: TObject;
begin
SomeObject := nil;
SomeObject := TObject.Create;
(...)
Maybe it is time for a NilAndCreate-function as counterpart of FreeAndNil :-)
ReplyDeleteIf only a "try" was sandwiched inbetween there...
ReplyDeleteMaxim Abramovich No, I can't. It was just a joke, after all. But my english isn't good enough to explain it. Maybe some of the others who gave a +1 for it can explain it ?
ReplyDelete