do i need dispose ephemeral disposable objects?
i have category creates several idisposable objects, objects following upheld another 'manager' category 3rd jubilee library. i need objects after calls i kept internal domain anxiety combined objects i opening during after time. i ran fxcop category conspicuous i should exercise idisposable, due disposable objects i kept anxiety to. questions are:
- should i exercise idisposable class? (or manager's responsibility?)
- if so, should i wholly dispose objects i kept anxiety to? should i proceed dispose objects i created.
my code:
public category myclass
{
classthatisdisposable areference;
}
public myclass(managerclass manager)
{
classthatisdisposable transient=new classthatisdisposable();
manager.add(transient);
areference=new classthatisdisposable();
manager.add(areference);
}
public vacant latercall()
{
areference.method();
}
Comments
Post a Comment