[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: PTP messaging sessions, and subtle difference between DELETE OBJECT and RUN deleteSessi

Status
Not open for further replies.
F

frank.meulblok

Guest
The docs can't be relied on to be complete and concise. In this case they fail to refer to how old-style handle-based objects are associated with the procedure that spawned them. The short version is that handle-based objects are *not* closely associated to a procedure by default and will outlive them unless otherwise specified. (Do not be fooled by the INSTANTIATING-PROCEDURE handle reference, that'll just go invalid while the object sticks around). This can be controlled by using widget-pools, which are managed by the procedure(s): Define a static widget-pool in the procedure, create the handle-based objects in that widget-pool, and when the procedure gets deleted, the widget-pool goes out of scope and the contained widgets get deleted. The long version continues with how and when implicitly created objects are allocated to existing widget-pools and what other exceptions exist. The extended version adds an epilogue explaining how that doesn't help with performing other clean-up tasks that you might find in a class' Destructor. Those are points that are beyond what I can tell off the top of my head.

Continue reading...
 
Status
Not open for further replies.
Top