Re: Is There Any Reason to Even Use VC++ Anymore?



Josh McFarlane wrote:
[...]
Contracts between the calling function and the destination functions
work quite nicely for me.

But over DLL boundaries you can't pass objects and ownership directly.
And if you have to share code with different languages you have to use DLLs.


> [...]
have that big of a problem with it. I just go with the philosophy of
the allocator owns the pointer, unless it calls another function which
always assumes ownership of the allocated pointer, and that the owner
is responsible for freeing the memory.
[...]


And if there are multiple owners ? E.g. if the object is stored in multiple lists ? How to keep track of ownership ?

I use reference counting in native C++, managed code does this "automatically" ;-)

Andre




.