[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KZoneAllocator
From:       Waldo Bastian <bastian () suse ! de>
Date:       2000-03-05 23:06:38
[Download RAW message or body]

On Sun, 05 Mar 2000, David Faure wrote:
> On Sun, Mar 05, 2000 at 11:38:24PM +0100, Waldo Bastian wrote:
> > On Sun, 05 Mar 2000, Carsten Pfeiffer wrote:
> > The ZoneAllocator is usefull for memory which all can be freed at
> > the same time, Stefan's allocator is usefull for memory blocks
> > which all have the same size. With FileItems both seems to be the
> > case so either one seems to be fine.
>
> Since all KFileItems that are held by the directory lister are
> deleted at once (in the "clear" method), KZoneAllocator seems fine.
>
> I guess it is still possible to delete an individual item ?
> Some time, people delete files... :-)

You just overload operator delete with a dummy function. Deleting the 
item will call the destructor of the item, but the memory will not be 
freed until you close the directory. I don't think that would be a 
problem 

Cheers,
Waldo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic