[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Changeset]: Re: cla() ?
From: |
Michael Goffioul |
Subject: |
Re: [Changeset]: Re: cla() ? |
Date: |
Fri, 10 Oct 2008 10:35:46 +0200 |
On Wed, Oct 8, 2008 at 8:26 PM, John W. Eaton <address@hidden> wrote:
> On 7-Oct-2008, Michael Goffioul wrote:
>
> | While we're talking about __go_delete__, does anybody
> | remember what was the idea behind removing an object
> | from its parent's children in __go_delete__, instead of
> | gh_manager::free? This makes life slighlty more complex
> | if you want to delete an object from C++, where you would
> | typically use gh_manager::free, but you then have to remove
> | the child manually from its parent's children.
> |
> | I don't think I wrote that part of the code, and I can't figure
> | out why it is written that way.
>
> It's likely that I wrote it, and I assumed that a call to the delete
> function should remove the handle from its parent's list of children.
> Is that not what should happen? If not, then what should happen? For
> example, what does Matlab do for
>
> h = line (); get (gca (), 'children'), delete (h); get (gca (), 'children')
>
> ? Shouldn't the children of the current axes be empty after H is
> deleted? If that doesn't happen automatically in the delete function,
> then how does it happen?
It should definitely be removed from the children list, that's not the
problem here. My question is why is that operation (== removing
the handle from its parent's children) in __go_delete__ and not in
gh_manager::free.
I'm asking, because when you want to delete an object from C++
world, you typically call gh_manager:free. But this does not take
care of updating the parent's children and you might easily forget
about it.
Michael.
- Re: [Changeset]: Re: cla() ?, (continued)
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/07
- Strange handle behavior (was Re: [Changeset]: Re: cla() ?), Ben Abbott, 2008/10/07
- Re: Strange handle behavior (was Re: [Changeset]: Re: cla() ?), Søren Hauberg, 2008/10/08
- Re: Strange handle behavior (was Re: [Changeset]: Re: cla() ?), Ben Abbott, 2008/10/08
- Re: Strange handle behavior (was Re: [Changeset]: Re: cla() ?), Michael Goffioul, 2008/10/08
- Re: Strange handle behavior (was Re: [Changeset]: Re: cla() ?), Ben Abbott, 2008/10/08
- Re: Strange handle behavior (was Re: [Changeset]: Re: cla() ?), John W. Eaton, 2008/10/08
- Re: Strange handle behavior (was Re: [Changeset]: Re: cla() ?), Michael Goffioul, 2008/10/08
- Re: Strange handle behavior (was Re: [Changeset]: Re: cla() ?), John W. Eaton, 2008/10/08
- Re: [Changeset]: Re: cla() ?, John W. Eaton, 2008/10/08
- Re: [Changeset]: Re: cla() ?,
Michael Goffioul <=
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/10
- Re: [Changeset]: Re: cla() ?, Michael Goffioul, 2008/10/10
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/10
- Re: [Changeset]: Re: cla() ?, John W. Eaton, 2008/10/10
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/10
- Re: [Changeset]: Re: cla() ?, John W. Eaton, 2008/10/10
- Re: [Changeset]: Re: cla() ?, Michael Goffioul, 2008/10/10
- Re: [Changeset]: Re: cla() ?, John W. Eaton, 2008/10/10
- Re: [Changeset]: Re: cla() ?, Ben Abbott, 2008/10/07
- Re: [Changeset]: Re: cla() ?, David Bateman, 2008/10/07