@Warfley, I am a bit confused here:
1. that example does not actually assigns something useful, like a stringlist.
2. the copy operator is empty, of course there is no copy. In my example the same: only the refcount is increased, since it is a reference.
3. the create is empty too
I have no clue if ASerge's example that you cite is viable, since it seems not complete, whereas my example is a complete example that always works on any class with a default, parameterless, constructor.
I suppose - as discussed and I acknowledged - that eventually this may very well be the way to go, but as it stands my interface approach has its own merits. It is even Delphi compatible.
Maybe ASerge will expand on his example? It would be interesting to see how that works in its entirity.
It is always good to see if any of us has made any progress on the subject: smart pointers can be very useful, e.g. in object persistent frameworks.
I have no particular affinity to any of both options, as long as they work..
