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.
ViewLink & IFrame Detach Issue
Posted by: Blade MF
Date: Thursday, 26-Nov-2009, 09:31:39
I am developing a bunch (a lot) of binary behaviors with C#. The problem is, that in some occasions IElementBehavior.Detach is not being called.
For example, if you have a simple html page with a single IFRAME in it, then, in the document in the IFRAME you put a binary behavior element, which creates a ViewLink. If you create another binary behavior element in the viewlink document, and the refresh the IFRAME, the Detach method of the inner element is not being called.
|--- HTML Page
|------- ViewLink document
I have a very simple code that demonstrates it.
I played arround with it for a few days and found out that if you force a garbage collection in the Element1.Detach, once in a while, Element2.Detach is called.
This means that there is some .NET object holding a reference that it should't hold.
The fun part is that this does not happen when NOT in a IFRAME - everything gets detached in time.
Does anyone have any idea?