Fixed destructor so it doesn't dealloc something we don't own.
Merge pull request #2 from seNes/master

Segfault fix