Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed memory problem in PrimaryVertexAnalyzer4PU #1793

Merged

Conversation

Dr15Jones
Copy link
Contributor

PrimaryVertexANalyzer4PU was allocating an array of arrays using new[] but failed to use delete[]. The problem was found by the static analyzer. Rather than fix the fragile delete, I switched to code to use container objects which manage their own memory. This also meant changing a function to return a std::vector rather than an int* and requiring the caller to remember to delete the item (there wrong delete was being used there anyway).

PrimaryVertexANalyzer4PU was allocating an array of arrays using new[] but failed to use delete[]. The problem was found by the static analyzer. Rather than fix the fragile delete, I switched to code to use container objects which manage their own memory. This also meant changing a function to return a std::vector<int> rather than an int* and requiring the caller to remember to delete the item (there wrong delete was being used there anyway).
@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_0_X.

Fixed memory problem in PrimaryVertexAnalyzer4PU

It involves the following packages:

Validation/RecoVertex

@nclopezo, @danduggan, @rovere, @cmsbuild, @deguio, @eliasron can you please review it and eventually sign? Thanks.
@cerati, @GiacomoSguazzoni, @rovere this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@ktf you are the release manager for this.

@cmsbuild
Copy link
Contributor

@deguio
Copy link
Contributor

deguio commented Dec 16, 2013

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it?

ktf added a commit that referenced this pull request Dec 16, 2013
…exAnalyzer4PU

Falidation fix -- Fixed memory problem in PrimaryVertexAnalyzer4PU
@ktf ktf merged commit 9c3f43a into cms-sw:CMSSW_7_0_X Dec 16, 2013
@Dr15Jones Dr15Jones deleted the fixMemoryProblemInPrimaryVertexAnalyzer4PU branch December 19, 2013 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants