Skip to content

Commit 20cbcd5

Browse files
authored
fixed memory leak
1 parent dc6221c commit 20cbcd5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)