Fixed potential memory leaks.
Each array allocated with new [n] must be deallocated using delete [].
Merge branch 'devel' of https://github.com/orbitcowboy/arrayfire into devel