Re: Memory leaks

"Gary Setter" <[email protected]>
Newsgroups gmane.comp.gnu.aspell.devel
Message-ID <000901c4bfba$bdcf05a0$25144a0c@pavilion>
----- Original Message ----- 
From: "Kevin Atkinson" <[email protected]>
To: "Gary Setter" <[email protected]>
Cc: <[email protected]>
Sent: Saturday, October 30, 2004 8:02 PM
Subject: Re: [aspell-devel] Memory leaks


> On Sat, 30 Oct 2004, Gary Setter wrote:
>
> > Most of the memory leaks are gone. But these remain.
> > > dump master
>
> I don't see any when I use that command.
>
Hi Kevin,

This is good. I had a leak, found it and I don't know why you
didn't have one. It centers on how your global cache works.

This is my new dump master code, note the new like with todays
date.

  } else if (action == do_dump) {
    EXIT_ON_ERR_SET(add_data_set(config->retrieve("master-path"),
*config), Dict *, d);
    StackPtr<Convert> conv(setup_conv(d->lang(), config));
    dump(d, conv);
    d->release(); //31-Oct-04
  }

What you may have intended, was to keep the Dict (aka Dictionary)
object in the global cache and let the destructor of the cache
delete it it. But your ~GlobalCacheBase does not release/delete
anything. How come you are not getting a memory leak?

Best regards,
Gary
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.