fixed undefined memory-cleanup for constval structs