Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dispose of SDK UI API Objects

Is it recommended to dispose the UI objects like this? Is there a check by sap on the refcount of the ui com objects?

System.Runtime.InteropServices.Marshal.ReleaseComObject( m_menu );

I know it is strongly recommended for DI objects and had already some trouble with it. Strange enough none of the sample code releases the objects witch is wrong in my opinion!

What is yours expirience with the UI objects? Do i have to dispose the after use?


The only objects that are required to be explicitily disposed are the DI metadata

objects. UI objects (and all the other DI objects) are not. So basically it is up to

your design choices whether you dispose them or not.

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question