Skip to content

Commit eadc8d8

Browse files
authored
Merge pull request #161 from Code-Hex/Code-Hex-patch-1
fixed memory leak for VZVirtioSocketListener
2 parents dc6221c + 20cbcd5 commit eadc8d8

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)