Hi,
I think there is design problem there, if you use a static class the purpose
is to serve not based on instances, so if you use resources you create and
dispose on the same method if they are not shared. That's why you can't
implement IDispose interface, the static class is on the heap.
In the only scenario that is valid a creation/destruction is when you have a
shared resource that needs to be disposed, in this case you should create
your own dispose method.
Hope this helps
Salva
"Vai2000" wrote:
Hi All I have a class with static data members in it. How do I un-initialize
them ? Looks like if static member is called repeatedly it has residual
memory from the last call. the member here is an Array. In other words how
do I ensure Destruction of the static members in the Class?
~Foo(){ glbArr.Clear();} this what I have thought of implementing.... Any
suggestions are welcome.
TIA