Fixed the access memory

When 'delete a' was call, the follow error was caused:

*** glibc detected *** ./mainapp: free(): invalid next size (fast): 0x08cf8028 ***

Now, this is correct. And release some memory, not release previous.