When to use
This class keeps a reference count for each singleton key. create(...) increases the count, and release(...) decreases it. When the count reaches 0, the instance is released. It is important that every successful create(...) call has a matching release(...) call to prevent memory leaks.
Related: KeyedInstanceFactory docs