Merge lp:~zorba-coders/zorba/bug-1027142-process-leak into lp:zorba/process-module

Proposed by Chris Hillery
Status: Merged
Approved by: Chris Hillery
Approved revision: 31
Merged at revision: 31
Proposed branch: lp:~zorba-coders/zorba/bug-1027142-process-leak
Merge into: lp:zorba/process-module
Diff against target: 32 lines (+10/-1)
2 files modified
src/com/zorba-xquery/www/modules/process.xq.src/process.cpp (+9/-0)
src/com/zorba-xquery/www/modules/process.xq.src/process.h (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1027142-process-leak
Reviewer Review Type Date Requested Status
Luis Rodriguez Gonzalez Approve
Chris Hillery Approve
Review via email: mp+116102@code.launchpad.net

Commit message

Clean up ExternalFunction objects when module is deleted.

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Luis Rodriguez Gonzalez (kuraru) wrote :

All seems to be alright.

review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-1027142-process-leak-2012-07-26T22-07-34.432Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/com/zorba-xquery/www/modules/process.xq.src/process.cpp'
2--- src/com/zorba-xquery/www/modules/process.xq.src/process.cpp 2012-01-11 18:21:38 +0000
3+++ src/com/zorba-xquery/www/modules/process.xq.src/process.cpp 2012-07-21 01:14:19 +0000
4@@ -525,6 +525,15 @@
5
6 /******************************************************************************
7 *****************************************************************************/
8+ProcessModule::~ProcessModule()
9+{
10+ for (FuncMap_t::const_iterator lIter = theFunctions.begin();
11+ lIter != theFunctions.end(); ++lIter) {
12+ delete lIter->second;
13+ }
14+ theFunctions.clear();
15+}
16+
17 zorba::ExternalFunction*
18 ProcessModule::getExternalFunction(const zorba::String& aLocalname)
19 {
20
21=== modified file 'src/com/zorba-xquery/www/modules/process.xq.src/process.h'
22--- src/com/zorba-xquery/www/modules/process.xq.src/process.h 2011-06-09 11:42:43 +0000
23+++ src/com/zorba-xquery/www/modules/process.xq.src/process.h 2012-07-21 01:14:19 +0000
24@@ -48,7 +48,7 @@
25 FuncMap_t theFunctions;
26
27 public:
28- virtual ~ProcessModule() {}
29+ virtual ~ProcessModule();
30
31 virtual zorba::String getURI() const
32 { return "http://www.zorba-xquery.com/modules/process"; }

Subscribers

People subscribed via source and target branches

to all changes: