Skip to content

Commit 24912ef

Browse files
committed
Merge branch 'safehandle' of https://github.com/shimat/opencvsharp into safehandle
2 parents 4dcbb42 + 28066dd commit 24912ef

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/OpenCvSharp/Modules/core/OutputArray.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ internal OutputArray(IEnumerable<Mat> mat)
6969
{
7070
if (mat is null)
7171
throw new ArgumentNullException(nameof(mat));
72+
IntPtr p;
7273
using (var matVector = new VectorOfMat(mat))
7374
{
7475
NativeMethods.HandleException(
75-
NativeMethods.core_OutputArray_new_byVectorOfMat(matVector.CvPtr, out var p));
76+
NativeMethods.core_OutputArray_new_byVectorOfMat(matVector.CvPtr, out p));
7677
}
7778
obj = mat;
7879
InitSafeHandle(p);

src/OpenCvSharp/Modules/stitching/AffineBestOf2NearestMatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public AffineBestOf2NearestMatcher(
2929
int numMatchesThresh1 = 6)
3030
: base(Create(fullAffine, tryUseGpu, matchConf, numMatchesThresh1))
3131
{
32-
InitSafeHandle(p);
32+
InitSafeHandle(ptr);
3333
}
3434

3535
private static IntPtr Create(

src/OpenCvSharp/Modules/stitching/BestOf2NearestMatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public BestOf2NearestMatcher(
2424
int numMatchesThresh2 = 6)
2525
: base(Create(tryUseGpu, matchConf, numMatchesThresh1, numMatchesThresh2))
2626
{
27-
InitSafeHandle(p);
27+
InitSafeHandle(ptr);
2828
}
2929

3030
/// <summary>

0 commit comments

Comments
 (0)