Re: Abnormal objects - how they can become normal again?



"Alex R. Mosteo" <devnull@xxxxxxxxxxxxxx> writes:

> Robert A Duff wrote:
> > (snip)
> > Another way to deal with abnormal (possibly controlled) objects is to
> > add a level of indirection. I believe you can Unchecked_Deallocate an
> > abnormal object (not sure). Assignment of access values does not
> > involve finalization. So when you have a possibly-abnormal object, you
> > could simply throw it away and create a new one.
>
> I guess you can indeed free abnormal controlled objects, but this will
> trigger finalization, and I think the OP wanted to avoid this (as this
> happens too when overwriting the abnormal object during asignation).

Good point.

So I guess the answer is, "never allow controlled objects to become
abnormal (if you wish to use them ever again)". And as I said, abort
deferral can help you program this. It's not easy.

- Bob
.