unit tests complete successfully with no leaks, introduced copy-swap idiom