W
White Wolf
assaarpa said:Yes, you can, but _that_ type must call the destructor where the
constructor was called. Factory design pattern is one solution, now the
only job left is to see that the destructor is invoked in the right
translation unit. A good way to do this is to to have DeleteThis(),
Release(), or similiar method and direct calls to destructor blocked,
these methods would then invoke "delete this;", where appropriate.
That tells a lot more about the design of DLL's in Windows than C++ or STL.
We are using dynamic load libraries and STL for over 5 years now on 3
opearting systems and several versions of them. We have never had trouble.
Of course if one works on a platform from a company, who always knows
better...
--
WW aka Attila
:::
A new study shows that licking the sweat off a frog can cure depression.
The down side is, the minute you stop licking, the frog gets depressed
again. - Jay Leno