On 07/19/2012 11:03 PM, julien2412 wrote:
Thank you David for the hint!
I re read the "An in-depth explanation" part of
http://stackoverflow.com/questions/3279543/what-is-the-copy-and-swap-idiom/3279550#3279550,
it's great ! I understood when and above all how the memory is cleaned.

About your multidimalgorithm, what would be the problem if it'd be changed
like this ? (to sum up: passing parameter by value to optimize)

It's a well-known but (in my impression) not-too-widely used idiom. And IIRC it even has no drawbacks (which is sometimes hard to tell, C++ being so baroque and fragile that something that looks rather innocuous can actually be an epic catastrophe).

Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to