Fix leak
ClosedPublic

Authored by ervin on Mar 2 2016, 10:16 PM.

Diff Detail

Repository
R4 Zanshin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ervin updated this revision to Diff 2529.Mar 2 2016, 10:16 PM
ervin retitled this revision from to Fix leak.
ervin updated this object.
ervin edited the test plan for this revision. (Show Details)
ervin added reviewers: bensi, franckarrecot, dfaure.
dfaure edited edge metadata.Mar 3 2016, 7:52 AM

Why not QScopedPointer for a simple case like this?

bensi accepted this revision.Mar 3 2016, 12:00 PM
bensi edited edge metadata.
This revision is now accepted and ready to land.Mar 3 2016, 12:00 PM
ervin added a comment.Mar 3 2016, 12:18 PM

Not copyable and not movable mainly, and didn't want to move away from the right to left orientation for type information.

Well, it's your code, but I find it worse to introduce refcounting where none is needed, than the stylistic issue of having the type on the left sign of the equal sign.

ervin updated this revision to Diff 2543.Mar 3 2016, 7:25 PM
ervin edited edge metadata.

Address dfaure's remark about refcounting

dfaure accepted this revision.Mar 4 2016, 8:09 AM
dfaure edited edge metadata.

Nice, it even keeps the type on the right type as you wanted ;)

This revision was automatically updated to reflect the committed changes.