H
Howard Swope
Greetings:
C++ CLR .Net 2
I have a ref class that I have created that wraps an unmanaged pointer. It
acts like a smart pointer for reference counted objects for a particular
library I am working in. I have overloaded the ->, *, assignment, and
equality operators. I have created a ! finalizer and call it from my
destructor. However, when I do so, the operator overload returns the type of
the wrapped pointer.
~MyClass()
{
this->!MyClass();
}
I get an error saying "WrappedPointer type doesn't have a function
!MyClass." I am having a hell of a time trying to call this. I am trying a
bunch of different things. Either it won't compile or I end in an endless
loop in the destructor. I know there is a way to do this.
???
Thanks
C++ CLR .Net 2
I have a ref class that I have created that wraps an unmanaged pointer. It
acts like a smart pointer for reference counted objects for a particular
library I am working in. I have overloaded the ->, *, assignment, and
equality operators. I have created a ! finalizer and call it from my
destructor. However, when I do so, the operator overload returns the type of
the wrapped pointer.
~MyClass()
{
this->!MyClass();
}
I get an error saying "WrappedPointer type doesn't have a function
!MyClass." I am having a hell of a time trying to call this. I am trying a
bunch of different things. Either it won't compile or I end in an endless
loop in the destructor. I know there is a way to do this.
???
Thanks