new error: using an owned pointer that is released in the same expression