Re: memory management with glibmm & giomm



On Wed, 2008-10-08 at 17:15 +0200, nico wrote:
> Hi everybody,
> 
> Here is a program that list recursively  files from a given directory.
> As I understood, Glib unref() my 3 variables at the end of the bloc {}, 
> so I don't have to care about that.
> But when It run this program, after 2 minutes it use already more than 
> 80 MB. Is something wrong?

it depends a bit on the structure of your filesystem. you are doing
depth-first descent through a directory structure. in some cases, this
would not use many resources; in others, you'd expect it to use a great
deal.

every single directory encountered will be enumerated, then each
directory within it will be recursively entered. by the time its done,
you've got enumerated data for just about every file below the starting
point. none of your data structures are cleaned up until control returns
to the top level. 






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]