Skip to content

Commit 1d1dbe3

Browse files
destroy texture object
1 parent 843df49 commit 1d1dbe3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/cudaimgproc/src/gftt.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,17 @@ namespace
135135

136136
int total = findCorners_gpu(eigTex_, eig_.rows, eig_.cols, static_cast<float>(maxVal * qualityLevel_), mask, tmpCorners_.ptr<float2>(), tmpCorners_.cols, counterPtr_, stream_);
137137

138-
139138
if (total == 0)
140139
{
141140
_corners.release();
141+
cudaSafeCall( cudaDestroyTextureObject(eigTex_) );
142142
return;
143143
}
144144

145145
sortCorners_gpu(eigTex_, tmpCorners_.ptr<float2>(), total, stream_);
146146

147+
cudaSafeCall( cudaDestroyTextureObject(eigTex_) );
148+
147149
if (minDistance_ < 1)
148150
{
149151
tmpCorners_.colRange(0, maxCorners_ > 0 ? std::min(maxCorners_, total) : total).copyTo(_corners, stream);

0 commit comments

Comments
 (0)