|
 |
On Sun, 04 May 2008 23:36:38 +0200, Darren New <dne### [at] san rr com> wrote:
>> Also, look up 'ios::xalloc'.
>
> Ok. It looks like it only works for one integer from one user-defined
> type at a time,
The words allocated with 'ios::xalloc' are not related to any user-defined
types. They have only whatever meaning you choose to give them.
> and if you cast it to a pointer, it still doesn't get cleaned up when
> the stream goes out of scope,
Correct. The stream object itself neither knows nor cares what you store
there.
> If you allocate (say) a buffer or something for the stream, at what
> point does that buffer get cleaned up?
If you mean "automatically" then not at all.
> So it looks like the answer is either "you can't do this with standard
> streams" or "for very limited cases it's built into the stream class
> already".
Depending on your definition of "very limited", yes.
--
FE
Post a reply to this message
|
 |