Fixed a segfault while deallocating a float[] and also improving the demo