mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
coreml : wrap inference call in @autoreleasepool to fix memory leak (#1218)
This commit is contained in:
parent
8e46ba80d3
commit
18e9889418
@ -53,10 +53,12 @@ void whisper_coreml_encode(
|
||||
error: nil
|
||||
];
|
||||
|
||||
@autoreleasepool {
|
||||
whisper_encoder_implOutput * outCoreML = [(__bridge id) ctx->data predictionFromLogmel_data:inMultiArray error:nil];
|
||||
|
||||
memcpy(out, outCoreML.output.dataPointer, outCoreML.output.count * sizeof(float));
|
||||
}
|
||||
}
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user