widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #01008
Re: [Merge] lp:~csirkeee/widelands/memory-leaks-2 into lp:widelands
1. You are completely right, that was a bit silly of me :)
2. Well yes, especially to me, passing a "new"-d object back as a reference seems quite misleading. But this is meant more as a "hotfix" then refactoring. I think boost::shared_ptr could be a bit of an overkill, as far as I see, they are only ever used in one place, never really shared. That said, I don't really have a better idea :) I think a minimal "solution" would be to pass a pointer instead, and have a comment at the function that it passes ownership back, but of course it's less secure.
--
https://code.launchpad.net/~csirkeee/widelands/memory-leaks-2/+merge/150290
Your team Widelands Developers is requested to review the proposed merge of lp:~csirkeee/widelands/memory-leaks-2 into lp:widelands.
References