Options

unrelased resource in page add-in

haksvehaksve Member Posts: 17
edited 2014-01-14 in NAV Three Tier
In a page add-in I declare and instantiate a class (bptiProxy) from a dll.
========================================================
BptiProxyClient bptiProxy;
.
.
.
if (bptiProxy == null)
{
bptiProxy = new BptiProxyClient();
}
========================================================
This causes the error "Exception has been thrown by the target of an invocation" when the page is opened a second time, unless I restart the RTC in between.
The add-in class implements Idisposible and contains method dispose like this:
========================================================
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
{
bptiProxy.Dispose();
}
}
========================================================
It seems like bptiProxy is not fully released until RTC is closed.

How can I solve this?

Best Regards / Håkan Svensson

Comments

  • Options
    krikikriki Member, Moderator Posts: 9,098
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.