codegen: Do not generate generic destroy func for non-disposable structs

Fixes bug 727652