On Mon, Jul 5, 2010 at 5:30 PM, Mattias Gaertner <nc-gaert...@netcologne.de> wrote: > > No. This will create a mem leak.
Thanks Mattias, I expect that... On Mon, Jul 5, 2010 at 5:39 PM, Martin <f...@mfriebe.de> wrote: > > that is the same as if you wrote > > TsomeObject.create; > > without assigning the created object to a variable. Both cause a memory > leek. > > Mind you just because "Create" is a constructor does not protect it from > being called without using the result. Yes, as Mattias said too. This type of construction should be banned, no? Different this, some times I use OUT parameters to force the caller to receive the result. Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal