On Thu, 11 Apr 2002, Martin Devera wrote:
> > Typically put() is the backup for delete. Should delete fail
> > to destroy because of reference counts being non-zero, put will catch it.
>
> So that if I understand it correctly: delete can only assure
> that class is "invisible" from now to subsequent gets/walks
> and other uses and leave actual destroy to the last put.
> Do you think that it is reasonable ?
>
sort of. If you look at the ATM scheduler, you should see the refcount
maybe incremented twice. In this case, delete will fail to destroy
the class but put() will catch it.
If you only increment/decrement then delete should always
catch it. In which case you dont need to destroy in put().
Your mileage may vary.
cheers,
jamal
|