Click here to Skip to main content
15,894,017 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can I minimize memory usage in my table-based statemachine with several hundred states? Pin
harold aptroot9-Mar-18 10:14
harold aptroot9-Mar-18 10:14 
AnswerRe: How can I minimize memory usage in my table-based statemachine with several hundred states? Pin
leon de boer9-Mar-18 15:16
leon de boer9-Mar-18 15:16 
QuestionHow to get object of a view which is created using AddView(). Pin
Sampath5799-Mar-18 0:38
Sampath5799-Mar-18 0:38 
AnswerRe: How to get object of a view which is created using AddView(). Pin
Victor Nijegorodov9-Mar-18 1:45
Victor Nijegorodov9-Mar-18 1:45 
GeneralRe: How to get object of a view which is created using AddView(). Pin
Sampath57910-Mar-18 23:20
Sampath57910-Mar-18 23:20 
GeneralRe: How to get object of a view which is created using AddView(). Pin
Victor Nijegorodov11-Mar-18 2:05
Victor Nijegorodov11-Mar-18 2:05 
AnswerRe: How to get object of a view which is created using AddView(). Pin
Richard MacCutchan9-Mar-18 5:18
mveRichard MacCutchan9-Mar-18 5:18 
GeneralRe: How to get object of a view which is created using AddView(). Pin
Sampath57911-Mar-18 6:04
Sampath57911-Mar-18 6:04 
GeneralRe: How to get object of a view which is created using AddView(). Pin
Victor Nijegorodov11-Mar-18 7:12
Victor Nijegorodov11-Mar-18 7:12 
GeneralRe: How to get object of a view which is created using AddView(). Pin
Richard MacCutchan11-Mar-18 22:32
mveRichard MacCutchan11-Mar-18 22:32 
QuestionHow to release IDispatch memory. Pin
Sampath5797-Mar-18 2:45
Sampath5797-Mar-18 2:45 
AnswerRe: How to release IDispatch memory. Pin
Jochen Arndt7-Mar-18 3:10
professionalJochen Arndt7-Mar-18 3:10 
GeneralRe: How to release IDispatch memory. Pin
Sampath5798-Mar-18 18:40
Sampath5798-Mar-18 18:40 
GeneralRe: How to release IDispatch memory. Pin
Jochen Arndt8-Mar-18 21:21
professionalJochen Arndt8-Mar-18 21:21 
GeneralRe: How to release IDispatch memory. Pin
Sampath5798-Mar-18 22:27
Sampath5798-Mar-18 22:27 
GeneralRe: How to release IDispatch memory. Pin
Jochen Arndt8-Mar-18 22:55
professionalJochen Arndt8-Mar-18 22:55 
Member 10253026 wrote:
First we get the attributes from the OCX interface using GetAttributes() and we get variant with Pdispvalue.... Does OCX increase the refernce count of Pdispvalue to one here ?
This should be part of the OCX documentation. I guess that the reference count is incremented.
Quote:
Then we attach this pdispval to the OledispatchdriverObject using AttachDispatch()...Does the reference count go to two ?
AttachDispatch() will increment the reference count. So you have to call Release() or set bAutoRelease. But when using AttachDispatch() your OleDispatchDriver object will be the owner of the interface. So you should not use the pDispVal member of the VARIANT afterwards anymore (set it to NULL to avoid using it).

Memory is only freed when the reference count becomes zero when calling Release().

I suggest to check the return value when calling Release(). Then you will know when memory is freed. To check the actual reference count without releasing, just call AddRef() and Release().
AnswerRe: How to release IDispatch memory. Pin
Randor 7-Mar-18 5:38
professional Randor 7-Mar-18 5:38 
Questionserializing an std::chrono::duration object with Boost Pin
Alexander Kindel7-Mar-18 2:12
Alexander Kindel7-Mar-18 2:12 
AnswerRe: serializing an std::chrono::duration object with Boost Pin
Alexander Kindel7-Mar-18 3:53
Alexander Kindel7-Mar-18 3:53 
GeneralRe: serializing an std::chrono::duration object with Boost Pin
Victor Nijegorodov7-Mar-18 4:31
Victor Nijegorodov7-Mar-18 4:31 
GeneralRe: serializing an std::chrono::duration object with Boost Pin
Alexander Kindel7-Mar-18 4:53
Alexander Kindel7-Mar-18 4:53 
GeneralRe: serializing an std::chrono::duration object with Boost Pin
Alexander Kindel7-Mar-18 4:36
Alexander Kindel7-Mar-18 4:36 
QuestionApplication launched by another program, how to debug? Pin
charlieg6-Mar-18 10:56
charlieg6-Mar-18 10:56 
AnswerRe: Application launched by another program, how to debug? Pin
Randor 6-Mar-18 15:29
professional Randor 6-Mar-18 15:29 
GeneralRe: Application launched by another program, how to debug? Pin
charlieg6-Mar-18 15:49
charlieg6-Mar-18 15:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.