Access Violation in freeArray

Sending array with ref causes an access violation

![2014-05-23 11_58_23-mingw32__e_dev_test](https://cloud.githubusercontent.com/assets/4785754/3068855/363f2f64-e293-11e3-96e7-0ab056f357bd.png)