[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-debug-dev] dispose() for ICDI target, thread and stack frame interfaces
|
An interface/class whose implementation allocates and holds on to
external (non-Java) resources is a good candidate for a dispose
method. We see this pattern in GUI libraries and it applies equally
to CDI. A CDI implementation typically deals with some external
entity--a debugger engine (DE). Consequently, CDI objects allocate
and attach themselves to DE resources. It may not be ideal to subject
the external entity to the non-deterministic cleanup of the VM
garbage collector. The only way to avoid that is through explicit
dispose calls.
The user steps out of a function in a debug session. CDT has no
further use for the topmost ICDIStackFrame but the CDI client has no
way of being told that today. The client may have all sorts of DE
cleanup it may need to do when a stack frame is no longer needed.
Using the Java finalize method is not ideal. The solution is to have
CDT calls ICDIStackFrame.dispose() when CStackFrame.dispose() is called.
John
At 04:13 AM 7/16/2008, Mikhail Khodjaiants wrote:
I don't mind adding ICDIDisposable if it is required. dispose() is added
to the CDT objects to prevent the "post-mortem" activity, for instance,
the event handling when a thread is terminated but the corresponding
CThread is still present in the GUI.
Why do you need to propagate this behaviour to the CDI layer?
Mikhail
-----Original Message-----
From: cdt-debug-dev-bounces@xxxxxxxxxxx
[mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of John Cortell
Sent: Tuesday, July 15, 2008 5:31 PM
To: CDT Debug developers list
Subject: [cdt-debug-dev] dispose() for ICDI target,thread and stack
frame interfaces
The CDI interfaces tied to the Debug View standard model hierarchy lack
a dispose method:
ICDITarget
ICDIThread
ICDIStackFrame
Their CDT counterparts (implementations) have a dispose method (e.g.,
CStackFrame.dispose) that could and should propagate the dispose to
their associated CDI object. This is needed for deterministic cleanup.
I was thinking of coming up with an ICDIDisposable. CDT would instanceof
for that interface and call it where available for implementations of
the above three interfaces and possibly more in the future where we find
a need. Any objections?
John
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
--
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended
recipient, please notify the sender immediately and do not disclose
the contents to any other person, use it for any purpose, or store
or copy the information in any medium. Thank you.
_______________________________________________
cdt-debug-dev mailing list
cdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev