C++11 move pattern in C with cleanup attribute