Oh! Thank you for catching that. Yes, this is going back to route a). As you can see I am not too versed in C++ development (the above seems quite an amateur mistake, I guess) so implementing solutions such as the "smart pointer" fall out of my abilities.