[omniORB] Removing sequences

Sai-Lai Lo S.Lo@orl.co.uk
Wed, 29 Apr 1998 10:52:28 +0100


>>>>> Tom Haggie writes:

> I'm wanting to destroy a sequence in my code and I
> can't work out how to, _release and _dispose are not
> methods on sequences. 

> I've searched the docs looking for sequence and 
> I'm none the wiser. Am I supposed to call delete on 
> them, I'd thought that we weren't but I can't work out 
> what else to do.

If the sequence is allocated on the heap, just call delete. A better
alternative is to use T_var type to manage your sequence. When the
T_var type goes out of scope, the sequence it manages will be deleted.
Of course if the sequence is an auto variable, its dtor will be called when
the thread goes out of the current scope.