Returning float array in Objective-C

Viewed 952

I would like to know how to return float array in methods.

In methods like:

- (float *) ......{
    float * result = malloc(sizeof(float) * number);
    ....
    return result;
}

My problem is that I didn't clean result float array. How can I do that?

2 Answers
Related