Am 02.10.2013 20:23, schrieb Maxim Fomin:

For me the bug is invalid since out parameter is implicitly ref and it
has nothing to do with initialization (you better think about it as an
assignment). This means there are no reasons to call destructor.

In my eyes the bug is clearly not invalid because it caused memory leaks for me. If you have a struct which is a wrapper to a malloced buffer, and you pass it to a function which takes the struct as out parameter, the destructor will never be called because the memory will simply be reinitialized and the memory will leak. In my eyes this is a clear struct lifetime bug.

Reply via email to