Skip to content

Commit

Permalink
added autorelease to prevent memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Hex committed Feb 25, 2024
1 parent 89a71a9 commit a111c55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtualization_11.m
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ void setStorageDevicesVZVirtualMachineConfiguration(void *config,
{
if (@available(macOS 11, *)) {
VZVirtioSocketListener *ret = [[VZVirtioSocketListener alloc] init];
[ret setDelegate:[[VZVirtioSocketListenerDelegateImpl alloc] initWithHandle:cgoHandle]];
[ret setDelegate:[[[VZVirtioSocketListenerDelegateImpl alloc] initWithHandle:cgoHandle] autorelease]];
return ret;
}

Expand Down

0 comments on commit a111c55

Please sign in to comment.