On Thu, Feb 07, 2008, Amos Jeffries wrote:
> > Amos, could you please poke the leak in IPAddress:GetAddrInfo a little?
> 
> I'll give it another try. But don't hold your breath too long on that one.

Why are you trying to allocate the structure on invocation of GetAddrInfo() ?

Wouldn't it be better to simply assert the caller must provide storage for
the structure, and you simply fill it in?

That avoids a malloc/free pair (as it'll generally be in the stack frame of the
caller or it'll be embedded in some other structure) and removes this special
case allocation.



Adrian

-- 
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -

Reply via email to