On Fri, 3 Oct 2003 17:21:07 +0200 (Romance Daylight Time) Vadim Zeitlin <[EMAIL PROTECTED]> wrote:
> 1. return raw pointer (no problem here as long as it's assigned to > shared_ptr in the caller, but, unlike when returning the object, > you can't ensure this -- still, in practice, I don't see any problems > with this, do you?) You cannot return locals this way. If the Profile object is constructed on demand as local variable, the function will return invalid pointer. > 2. return const shared_ptr reference: this, of course, supposes that all > pointers are stored as shared_ptrs but this is the goal anyhow Same problem as above. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Mahogany-Developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mahogany-developers
