Issue 102220

Summary: dtrans: release resources on shutdown
Product: gsl Reporter: caolanm
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: DEV300m48   
Target Milestone: ---   
Hardware: All   
OS: Linux, all   
Issue Type: TASK Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
plausible patch none

Description caolanm 2009-05-25 12:10:42 UTC
We've got a good bit of infrastructure in dtrans to release resource on exit,
but as far as I can see its not possible for it to get called, right ?

Its no biggy in practice, but its disturbing my efforts to see what X resources
we might be leaking :-). Plausible patch attached
Comment 1 caolanm 2009-05-25 12:11:06 UTC
Created attachment 62497 [details]
plausible patch
Comment 2 caolanm 2009-05-25 15:04:36 UTC
nah, that's a stinker. Lets take that back
Comment 3 philipp.lohmann 2009-05-25 17:00:44 UTC
The reason, why it is in its current "unclean" state is that at the time we did
not have a mechanism that would know when the library gets unloaded (in fact, at
the time it was worse, the application did a premature _exit to avoid static
destructors in dynamically loaded modules; incidentally this is what Apple's
Cocoa toolkit does today).

Originally I planned to move dtrans into vcl - where lots of the problems you
get from having to synchronize with vcl without linking against it could be
solved; other ports would benefit from this move, too, like the mac services
implementation. That is however a question of timeframe,  at the moment I'm
booked out. Anyway, with that plan you would have a DeInit function that could
be used to determine a point in time in which the application will surely not
access the service anymore.

Just my 2 cents; I completely agree that the current state of affairs leaves
plenty of room for improvement.
Comment 4 Marcus 2017-05-20 11:33:43 UTC
Reset assigne to the default "".