Skip to content

Commit

Permalink
Merge pull request Kitt-AI#231 from chashmeetsingh/patch-1
Browse files Browse the repository at this point in the history
fixes memory leak
  • Loading branch information
chenguoguo authored Jun 29, 2017
2 parents a6a47a0 + f859f9c commit b99e328
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/iOS/Swift3/SnowboyTest/SnowboyWrapper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ -(int)runDetection:(NSArray*)data length:(int)length
dataArray[i] = [[data objectAtIndex:i] floatValue];
}

return snowboy->RunDetection(dataArray, length);
int detected = snowboy->RunDetection(dataArray, length);
free(dataArray);
return detected;
}

-(bool)reset
Expand Down

0 comments on commit b99e328

Please sign in to comment.