Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IplImage.InitImageHeader and Dispose #51

Closed
Svolo4 opened this issue Sep 12, 2014 · 1 comment
Closed

IplImage.InitImageHeader and Dispose #51

Svolo4 opened this issue Sep 12, 2014 · 1 comment
Labels
bug Something isn't working

Comments

@Svolo4
Copy link

Svolo4 commented Sep 12, 2014

The last commit on DisposableObject.cs (67dcd6a#diff-8) introduced a bug by not initializing AllocatedMemorySize property on IplImage.InitImageHeader -> IplImage.ctor -> DisposableObject.AllocMemory -> DisposableObject.NootifyMemoryPressure code path. That results in cvReleaseImage beeing called in IplImage.Dispose what in turn results in crash if CvArr.SetData is used to set managed array on the created IplImage afterwards (as the native code tries to free the pinned managed memory).

@shimat shimat added the bug Something isn't working label Sep 18, 2014
@shimat
Copy link
Owner

shimat commented Sep 18, 2014

Thank you. NotifyMemoryPressure is restored.

e3b5490

@shimat shimat closed this as completed Oct 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants