[openbeos] Re: Pointer or reference?

  • From: "Scott MacMaster" <scott@xxxxxxxxxxxxxxxxxx>
  • To: <openbeos@xxxxxxxxxxxxx>
  • Date: Thu, 1 Apr 2004 01:43:58 -0500

> > First, I would not want my objects to automatically be destroyed when
> > they
> > are removed from the hierarchy, because I may want to use the object
> > somewhere else.
>
> Wouldn't you instantiate a new instance of the object in that case?

If I want to use the object somewhere else, I probably want the object to be
in the same state.  If I were to let the object be deleted and then create a
new instance later, I'd have to save it's state and then restore it.  What
possible benefit could I get from that?


Later,
Scott MacMaster


Other related posts: