arlo on 1 Jul 2003 14:51:01 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ALACPP] hot or not?


> Of course. So, you agree with the idea of giving monostate a smart pointer
> interface?

I've always thought smart pointers were the right abstraction to use to
encapsulate any memory management issues. Since that's basically what
Monostate is, I think it's a great idea. Hadn't thought of it m'self, but it
fits well.

The really nice thing about such an approach is that I make sure all dynamic
memory objects are in smart pointers. Thus, if I want to change the monostate
from a monostate to a "normal" object, I just have to change the typedef to a
different type of smart pointer (and then put instances somewhere).

Arlo



_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp