Issue 80459 - early return before delete is called
Summary: early return before delete is called
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 680m224
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: carsten.driesner
QA Contact: issues@framework
Depends on:
Reported: 2007-08-08 09:35 UTC by jnavrati
Modified: 2008-03-13 15:55 UTC (History)
1 user (show)

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

patch to fix the leak (2.08 KB, text/plain)
2007-08-08 09:35 UTC, jnavrati
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jnavrati 2007-08-08 09:35:03 UTC
return could be called before deleting pointers. Using std::auto_ptr that take
care of deleting.
Comment 1 jnavrati 2007-08-08 09:35:34 UTC
Created attachment 47379 [details]
patch to fix the leak
Comment 2 Mathias_Bauer 2007-08-08 11:48:34 UTC
reassigned to Carsten
Comment 3 carsten.driesner 2007-08-09 08:59:44 UTC
cd->jnavrati: Thanks for your patch. I am now busy with showstopper tasks and
will check your changes as soon as possible. For your information: the correct
order of destruction is vital for the Main method. Therefore just using
std::auto_ptr can create serious problems.
Comment 4 carsten.driesner 2007-08-14 14:18:07 UTC
cd->jnavrati: Thanks for your work. I accept your patch with a little change to
be sure that the Path and LanguageOptions get destroyed before the UCB is
de-initialized. At least the PathOptions uses the UCB internally. I am not sure
that the dtor of the PathOptions in the future will use the UCB functions. At
least there is a chance that someone can change the code without knowing the
dependence to the desktop code.
Comment 5 carsten.driesner 2007-09-28 11:30:18 UTC
cd: Verified on CWS.
Comment 6 carsten.driesner 2008-03-13 15:55:25 UTC
cd: Closed.