[[ MemoryLeak ]] Fixes for memory leaks for some property types and array sorting