Skip to content

Commit a111c55

Browse files
committed
added autorelease to prevent memory leak
1 parent 89a71a9 commit a111c55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

virtualization_11.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ void setStorageDevicesVZVirtualMachineConfiguration(void *config,
630630
{
631631
if (@available(macOS 11, *)) {
632632
VZVirtioSocketListener *ret = [[VZVirtioSocketListener alloc] init];
633-
[ret setDelegate:[[VZVirtioSocketListenerDelegateImpl alloc] initWithHandle:cgoHandle]];
633+
[ret setDelegate:[[[VZVirtioSocketListenerDelegateImpl alloc] initWithHandle:cgoHandle] autorelease]];
634634
return ret;
635635
}
636636

0 commit comments

Comments
 (0)