cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Does the pointer to a DHandle remain in memory, while the model it refers to remains in memory?

jcole
4-Participant

Does the pointer to a DHandle remain in memory, while the model it refers to remains in memory?

I am using Creo Parametric Release N/A and DatecodeN/A

I would appreciate if you could please clarify the following for me about DHandles (pro_model_item in particular). Does the pointer to a DHandle  remain in memory, while the model it refers to remains in memory? For example when I use the ProSolidBodiesCollect function i.e, 
ProSolidBody* bodies{ nullptr };
ProSolidBodiesCollect(proMdl) &bodies)
t* o_body_num; ProArraySizeGet(bodies, o_body_num);
 will the memory addresses for the bodies I get as output remain valid during a session? What I see is that I can actually copy the addresses and use them elsewhere in my code. Is this accidental? When I call the same function again I get different addresses for the bodies though, so if the addresses remain valid do I keep opening new DHandles by calling the function multiple times? Should I be closing them and if so, which function should I use to do so? Thanks a lot

0 REPLIES 0
Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags