BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.

IAPIToolUIData::SetUserData

Oleg
Expert
May be anybody knows details about following.

For the reference:
TestSettingsPageObserver::SetUserDataToDefault function in Panels.cpp of the Panel_Test example.

userData.dataHdl handle is not released ( BMKillHandle ) after call of SetUserData.

Is it a bug ( and memory leak ) in this example or the handle really is not required to be released in this case ?
2 REPLIES 2
Andras Babos
Graphisoft Alumni
Graphisoft Alumni
You're right Oleg, that's a bug.

The last lines of that method should look like this:
 
	tabPage->uiData->SetUserData (&userData); 
	BMKillHandle (&userData.dataHdl); 


It will be corrected in the next DevKit.

Thanks:
Andras.
Oleg
Expert
Andras wrote:
You're right Oleg, that's a bug.

The last lines of that method should look like this:
 
	tabPage->uiData->SetUserData (&userData); 
	BMKillHandle (&userData.dataHdl); 
Thank you Andras. You have confirmed my guesses. Actually I used BMKillHandle in my code, but asked as I had some doubts.
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!