Issue 112602 - package: use rtl::Static to wrap globals
Summary: package: use rtl::Static to wrap globals
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: code (show other issues)
Version: DEV300m83
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: 3.4.1
Assignee: mikhail.voytenko
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks: 107490
  Show dependency tree
 
Reported: 2010-06-22 14:45 UTC by caolanm
Modified: 2017-05-20 09:30 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
like so (8.96 KB, patch)
2010-06-22 14:46 UTC, caolanm
no flags Details | Diff
better effort (8.33 KB, patch)
2010-06-24 16:58 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2010-06-22 14:45:12 UTC
The attached patch...

a) Replaces the hand-rolled "static pointer check + guard + static object and
assign to pointer" patterns with the rtl::Static template implementation of the
same pattern. No real change, just slightly prettier I guess.
b) Replaces the global aImplementationId objects with rtl::Static equivalents in
order to give a deterministic order of construction and destruction which
ensures that uno::Sequences don't outlive the cppu infrastructure which is
required for them to work correctly. Currently the cppu stuff deliberately
leaks, so this isn't noticeable at the moment.

(as an aside, the ctor argument to ::cppu::OImplementationId is passed down to
rtl_createUuid as bUseEthernetAddress and is ignored these days, so I've made
the change to omit it here as well, which makes things simpler)
Comment 1 caolanm 2010-06-22 14:46:08 UTC
Created attachment 70148 [details]
like so
Comment 2 caolanm 2010-06-24 16:58:42 UTC
Created attachment 70204 [details]
better effort
Comment 3 mikhail.voytenko 2010-06-29 12:38:46 UTC
Thank you for the patch, I will integrate it in one of the next framework cws's.
Comment 4 mikhail.voytenko 2010-09-28 13:52:42 UTC
Integrated in cws fwk149
Comment 5 mikhail.voytenko 2010-10-25 14:13:04 UTC
Development issue, setting to verified by myself.