top | item 40456642

(no title)

Mesopropithecus | 1 year ago

In the second example, buffer is still a pointer? If so, when does free run, and who decides that? When buffer goes out of scope, could do_stuff store the pointer some place else?

I find this an interesting thought experiment, basically types that you'd opt in to RAII. Just have a feeling that you'll need to define some notion of ownership to make it work.

discuss

order

No comments yet.