This project has moved and is read-only. For the latest updates, please go here.

Multi-instance Parts and their Containers

Apr 15, 2009 at 10:34 PM
From what I understand of the documentation, you can have a Part that can be multi-instanced (non-shared).  And that the Parts lifetimes are tied to the Container (dispose the Container, the Parts go away too).  What I'm wondering is how can I create multiple instances of a Part, and manage each Part's lifetime independently.  For example, an instance of Part A is loaded, then a second, then a third.  Later (milliseconds to weeks later), I want to throw away instance 1 and keep the other two alive.  How do I do this?  Right now I'm thinking I have to have one Part per Container, and go with shared.  Then I throw away the Container to throw away the Part.  This seems overly burdensome to me.  What is the "approved" way of individually managing the lifetimes of muliple Parts' instances?