Re: ListStoreModel clear() seems to be corrupted nearby memory



I also tried this code as well to erase all the rows

type_children children = PtrCoreByteSelModel[x][i]->children();
                for(type_children::iterator iter = children.begin();
                    iter != children.end();)
                {
                  iter = PtrCoreByteSelModel[x][i]->erase(iter);
                  //Do something with the row - see above for set/get.
                }

but this causes the same issue as ->clear() did.

On Dec 19, 2007 11:54 AM, Josh Sinykin <jsinykin gmail com> wrote:
> Murray thank you for your response. I posted the definitions and the
> code I am calling. From what I can tell, I am using ->clear(), can you
> please take a second look and let me know. Thanks.
>
>
> On Dec 19, 2007 11:45 AM, Murray Cumming <murrayc murrayc com> wrote:
> >
> > On Wed, 2007-12-19 at 10:07 -0700, Josh Sinykin wrote:
> > > I am experiencing a weird memory situation related to the clearing of
> > > a ListStore Model.
> >
> > You are probably calling liststore.clear(), instead of
> > liststore->clear(), so you are clearing the RefPtr.
> >
> > It's a common (and understandable) mistake. We have already deprecated
> > and replaced RefPtr::clear() but we can't remove it from the API.
> >
> > --
> > murrayc murrayc com
> > www.murrayc.com
> > www.openismus.com
> >
> >
>


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