This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.
I suggest the following lines be removed from HtmlEditor.Dispose:
layer to release the object.
IntPtr ptr = Marshal.GetIDispatchForObject(this);
int i = Marshal.Release(ptr);
while (i > 0)
{
i = Marshal.Release(ptr);
}
I'm not exactly sure what about my case is unique, but on the call to GetIDispatch... I get an invalid cast exception. I think this may be due to the fact that my form is already hidden at this point. I don't know of any way to make this "safe" besides putting an exception block around it, and I beleive that the marshalling layer will properly release the IDispatch, so should the lines simply be removed?