On Mon, Jul 5, 2010 at 5:30 PM, Mattias Gaertner <[email protected]> wrote: > > No. This will create a mem leak.
Thanks Mattias, I expect that... On Mon, Jul 5, 2010 at 5:39 PM, Martin <[email protected]> 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 - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
