- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the Close() call in the following code necessary, or is it redundant, as it is followed by Release()?
PXCSenseManager* myManager = PXCSenseManager::CreateInstance(); myManager->Init(); // Usually some more code here... // ... myManager->Close(); myManager->Release();
In general, when myManager is a pointer to a valid PXCSenseManager object, does myManager->Release() internally call myManager->Close()?
Note that I posted a similar question regarding C#, two days ago: Does C# PXCMSenseManager.Dispose() call PXCMSenseManager.Close()? But I guess the answer might be different.
Kind regards, Niels
--
Niels Dekker
Scientific programmer at LKEB
Leiden University Medical Center
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. There are two methods called Close() in the docs:
close() is listed as part of the Java interface in the docs:
There is another method called Close() in C++:
I guess you are referring to this Close() method, which is for terminating the StreamFrames thread.
My guess would be that Release() does not call Close(), since you may not be using StreamFrames() at all. You may just directly use pairs of AcquireFrame/ReleaseFrame calls in your own thread. So there would be no need to call Close() in that use case, but you always need to pair CreateInstance() with Release() in C++

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page