Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Elemer Nagy
athena
Commits
8bc274ac
Commit
8bc274ac
authored
8 years ago
by
Tadej Novak
Browse files
Options
Downloads
Patches
Plain Diff
IDC_OverlayBase: Fix memory leaks when merging containers
Former-commit-id: bf72df7d4623c4b0b4c069cd8a513b8f864fa20f
parent
c53310b8
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc
+12
-3
12 additions, 3 deletions
...lay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc
with
12 additions
and
3 deletions
Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc
+
12
−
3
View file @
8bc274ac
...
@@ -65,6 +65,7 @@ std::cout<<"start overlayContainer"<<std::endl;
...
@@ -65,6 +65,7 @@ std::cout<<"start overlayContainer"<<std::endl;
if ( outputContainer->addCollection(coll_data, p_data.hashId()).isFailure() ) {
if ( outputContainer->addCollection(coll_data, p_data.hashId()).isFailure() ) {
parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg; //" collectionNo "<<collectionNo<<endmsg;
parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg; //" collectionNo "<<collectionNo<<endmsg;
delete coll_data;
}
}
}
}
...
@@ -94,16 +95,19 @@ std::cout<<"start overlayContainer"<<std::endl;
...
@@ -94,16 +95,19 @@ std::cout<<"start overlayContainer"<<std::endl;
outputContainer->removeCollection(p_ovl.hashId());
outputContainer->removeCollection(p_ovl.hashId());
if (outputContainer->addCollection(out_coll, p_ovl.hashId()).isFailure() ) {
if (outputContainer->addCollection(out_coll, p_ovl.hashId()).isFailure() ) {
parent->msg(MSG::WARNING) << "overlay addCollection failed " << endreq;
parent->msg(MSG::WARNING) << "overlay addCollection failed " << endreq;
delete out_coll;
}
}
delete coll_data;
delete coll_ovl;
}
}
else {
else {
/** Copy the complete collection from ovl to output,
/** Copy the complete collection from ovl to output,
hopefully preserving the "most derived" type of its raw data */
hopefully preserving the "most derived" type of its raw data */
if ( outputContainer->addCollection(coll_ovl, coll_id).isFailure() ) {
if ( outputContainer->addCollection(coll_ovl, coll_id).isFailure() ) {
parent->msg(MSG::WARNING) << "add mc Collection failed " << endreq;
parent->msg(MSG::WARNING) << "add mc Collection failed " << endreq;
delete coll_ovl;
}
}
delete out_coll;
}
}
}
}
...
@@ -146,6 +150,7 @@ std::cout<<"start overlayContainer"<<std::endl;
...
@@ -146,6 +150,7 @@ std::cout<<"start overlayContainer"<<std::endl;
if ( outputContainer->addCollection(coll_data, p_data.hashId()).isFailure() ) {
if ( outputContainer->addCollection(coll_data, p_data.hashId()).isFailure() ) {
parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg;
parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg;
}
}
delete coll_data;
}
}
/** Add data from the ovl container to the output one */
/** Add data from the ovl container to the output one */
...
@@ -179,15 +184,19 @@ std::cout<<"start overlayContainer"<<std::endl;
...
@@ -179,15 +184,19 @@ std::cout<<"start overlayContainer"<<std::endl;
outputContainer->removeCollection(p_ovl.hashId());
outputContainer->removeCollection(p_ovl.hashId());
if (outputContainer->addCollection(out_coll, p_ovl.hashId()).isFailure() ) {
if (outputContainer->addCollection(out_coll, p_ovl.hashId()).isFailure() ) {
parent->msg(MSG::WARNING) << "overlay addCollection failed " << endreq;
parent->msg(MSG::WARNING) << "overlay addCollection failed " << endreq;
delete out_coll;
}
}
delete coll_data;
delete coll_ovl;
}
}
else {
else {
/** Copy the complete collection from ovl to output,
/** Copy the complete collection from ovl to output,
hopefully preserving the "most derived" type of its raw data */
hopefully preserving the "most derived" type of its raw data */
if ( outputContainer->addCollection(coll_ovl, coll_id).isFailure() ) {
if ( outputContainer->addCollection(coll_ovl, coll_id).isFailure() ) {
parent->msg(MSG::WARNING) << "add mc Collection failed " << endreq;
parent->msg(MSG::WARNING) << "add mc Collection failed " << endreq;
delete coll_ovl;
}
}
delete out_coll;
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment