|
<< Click to Display Table of Contents >> Navigation: Conversion Best Practices > PowerShell > DBWApp Handling |
When converting calls that involve DBWApp, references must not be redirected to $app.Parent().Instead, they must be redirected to $app.ParentManaged().
The ParentManaged() method returns a dynamic .NET object that acts as a wrapper around the underlying COM object. This wrapper automatically applies the same managed wrapping to all objects returned by methods invoked on it.
Important:
Every object obtained through ParentManaged() must be explicitly released by calling the Dispose() method when it is no longer needed. Failure to properly dispose of these objects may result in unreleased COM references and resource leaks.