replace delete by '= null'
Merge pull request #55 from fi11/memory-optimization

remove usage of delete in code