[fpc-devel] RE: Ansistrings and General Memeory Management Questions

Jason P Sage jasonpsage at jegas.org
Wed Feb 14 18:02:33 CET 2007


I'm still on the look out for responses to my previous post if any one is
interested - but I wanted to share a blooper if this is ok. This frustrated
me intensely - but the ability to laugh at myself - is a good thing! I found
this rather amusing - something only a computer programmer could find
humorous:

--------------------------------------------------
CODE SNIPPET---BEGIN
--------------------------------------------------

//==========================================================================
===

Destructor JFC_CGIENV.destroy;

//==========================================================================
===

Begin

  // BROKEN CODE - THIS is the memory leak Created by Jason 2007-02-13 and 

  // found in the snow storm of 2007-02-14 - the following day - and fixed -


  // after half a day/ lost tracking down this dumb (censored) right here!

  {Inherited;

  self.ENVVAR:=JFC_XDL.create;

  self.DATAIN:=JFC_XDL.create;

  self.CKYIN:=JFC_XDL.create;

  self.CKYOUT:=JFC_XDL.create;

  }

  
  { the fix - duh? How could I do this ahhhh!!!! Jason}

  self.ENVVAR.destroy;

  self.DATAIN.destroy;

  self.CKYIN.destroy;

  self.CKYOUT.destroy;

  Inherited;

End;

//==========================================================================
===


--------------------------------------------------
CODE SNIPPET---END
--------------------------------------------------

Best Regards,

Jason P Sage
jasonpsage at jegas.com


http://www.jegas.com


 




More information about the fpc-devel mailing list