The problem is when i read component‘s customInfo,i need to use GetModeDoc2(). if the function return null,i need to open the file.But if the file have too many component,the memory will broken down .So Is there have anyway to release memory?I try to use modelDoc2.close() and Swapp.closeDoc("**").they have do nothing.I see the documentManager but i haven't the lisence.
If GetModelDoc2 is null for a component, that means it is lightweight (or suppressed). If you open the document in its own window, and the assembly is still open, you cannot close the document because it's still open in the assembly. You can close the document's window and set the component back to lightweight. Or, even better, instead of opening the document, simply set the component to resolved (which will open the document, but not give it a window). You can then access its custom properties and then "close" it by setting the component back to lightweight.