fix memory leak for memory views in extension subtypes