Re: [Boost-users] Macro to contruct/allocate a shared_ptr?
[snip]
I just have a problem with having the user manage the memory. ie I'd rather do the following:
shared_ptr<Test> p(1, 'a', "hello"); or: shared_ptr<Test> p = newptr<Test>(1, 'a', "hello");
instead of:
shared_ptr<Test> p(new p(1, 'a', "hello"));
but i guess that's a limitation of the language. to get
hi, have a look at shared_new.zip in the vault. http://tinyurl.com/khd8v -- HTH dave
Hi Dave. That code went over the top of my head. Do you mind giving me
an example of the usage?
On 7/14/06, David Klein
[snip]
I just have a problem with having the user manage the memory. ie I'd rather do the following:
shared_ptr<Test> p(1, 'a', "hello"); or: shared_ptr<Test> p = newptr<Test>(1, 'a', "hello");
instead of:
shared_ptr<Test> p(new p(1, 'a', "hello"));
but i guess that's a limitation of the language. to get
hi,
have a look at shared_new.zip in the vault.
-- HTH dave _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
bringiton bringiton
-
David Klein