How to kill a dynamic container reference?

I have a container I dynamically embedwithin a window. I add this into an array and manage the app. I then close that container in the array, set it to Nil, and then remove it from the array. The window still holds a reference to it and I am trying to figure out what I am missing in order to delete the window’s reference to this container.

      // CREATE THE DevProfileContainer
      DynDevProfileClass.DynDevProfileContainer = New DevProfileContainer
      DynDevProfileClass.DynDevProfileContainer.Left = 230
      DynDevProfileClass.DynDevProfileContainer.Top = 104
      DynDevProfileClass.DynDevProfileContainer.EmbedWithin(AristaEAPI_Window)
      // APPEND TO DynDevProfileClassArray
      Common_Module.DynDevProfileClassArray.Append DynDevProfileClass
  // REMOVE ALL ASSOCIATED CONTAINERS/SOCKETS/ETC.
  AristaEAPI_Window.DynResultsContainerArray(AristaEAPI_Window.SelectedIndexID).Visible = False
  AristaEAPI_Window.DynResultsContainerArray(AristaEAPI_Window.SelectedIndexID).Close
  AristaEAPI_Window.DynResultsContainerArray(AristaEAPI_Window.SelectedIndexID) = Nil
 Common_Module.DynDevProfileClassArray.Remove  AristaEAPI_Window.SelectedIndexID

this is after the above snippet runs.

I know I must be missing something?

Thank you much in advance!

I found this:

http://forums.realsoftware.com/viewtopic.php?f=1&t=47030&p=263213

Which looks like what I need to track my Window References so I can kill them :slight_smile:

I am still struggling on how to delete this reference… Any advice would be appreciated :slight_smile:

I just need to kill the reference of the dynamic container on the window without closing that window.

The moral to my story above is to .CLOSE all of your dynamic containers — not some of them :slight_smile: I had an ID10T error :slight_smile: