----- Original Message ----- From: "Marvin Humphrey" <[EMAIL PROTECTED]> To: "Sisyphus" <[EMAIL PROTECTED]> Cc: <inline@perl.org> Sent: Tuesday, June 21, 2005 2:53 AM Subject: Re: Object Oriented Inline C
> On Jun 19, 2005, at 9:06 PM, Sisyphus wrote: > > To get rid of the "Free to wrong pool..." error, I've deleted the > > free()ing > > of the 2 struct elements from DESTROY(). Is that the correct fix? > > > For some reason *both* the Civilian objects and the Soldier objects > > now get > > DESTROY()ed without error (for me anyway) - but surely the job is > > not being > > done correctly ?? > > Looks like a memory leak to me. You're no longer freeing the memory > allocated by strdup. > Yes, I agree. I was surprised that the script in the cookbook produced that error (because the code looks correct to me) - and I don't know what the correct fix is. There's no problem with that cookbook script with perl 5.6. Cheers, Rob