Memory Leak Fix in select auto