In the future, for reference, I received a response from the corporate library support team. They placed a link to the following:
Managed C ++ and IDisposable I am writing code using the new Managed C ++ / CLI syntax, and I encountered this error:
error C2039: "Dispose": is not a member of "System :: IDisposable"
The code I started with this:
image->Dispose();
which gave me the same compiler error, so I wanted to eliminate the class / namespace error, so I rewrote it like this:
((IDisposable ^)image)->Dispose();
This gave the above error. Hop!
Here's the fix:
use delete. Managed C ++ now hides Dispose () inside the finalizer. Just delete the object, it processes the rest. Freaky.
It really works !!!!
source share