Skip to content

Commit 60006fa

Browse files
committed
LongRunningCSharpRegion.cs bug fix
1 parent a67a6bb commit 60006fa

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

PythonNETExtensions/Core/LongRunningCSharpRegion.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
using System.Runtime.CompilerServices;
2+
using PythonNETExtensions.Core.Handles;
23

34
namespace PythonNETExtensions.Core
45
{
56
public readonly ref struct LongRunningCSharpRegion
67
{
78
private readonly ref PythonHandle Handle;
8-
9+
910
[MethodImpl(MethodImplOptions.AggressiveInlining)]
10-
public LongRunningCSharpRegion()
11+
internal LongRunningCSharpRegion(ref PythonHandle handle)
1112
{
12-
Handle.Dispose();
13+
Handle = ref handle;
14+
handle.Dispose();
1315
}
1416

1517
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)