I'm going to try this
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/a6a896ca-8905-41fb-8f52-7f39e89c9a91/[
^]
Most examples seem to be around console style execution, using a domain for my issue seems much more complicated since the plugin which is being loaded is a user control that needs to be hosted on a form in another domain
Thanks to everyone for their contribution. The biggest problem I had was understanding domains, as it turns out I would need to redesign our plugin mechanism significantly to put my plugins in their own domains. The interface between the host and the plugin is a usercontrol/embedded in a VB6 form as an activeX so is not easy to separate out. However I managed to fix a significant memory issue as follows:
In the VB6 Form a .net user control is created using:
Set EntryControl = Me.Controls.Add(ctlname, "Entry")
In the form unload the release is called by setting entrycontrol to nothing:
Set EntryControl = Nothing
The problem was I also had some reference to interfaces of EntryControl, once these where set to nothing the com interface is released and garbage collection can occur
Set iEntryControlInterface1 = Nothing
Set iEntryControlInterface2 = Nothing
Set EntryControl = Nothing