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;
(...)

Comments

  1. Maybe it is time for a NilAndCreate-function as counterpart of FreeAndNil :-)

    ReplyDelete
  2. If only a "try" was sandwiched inbetween there...

    ReplyDelete
  3. Maxim 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

Post a Comment