T
tshad
If I have a list collection that I set up and use and then want to
re-initialize it, can I just do a "new" again or do I need to get rid of it
first.
For example:
If I have a PropertyForeignKey class, which is just a list of properties and
I have another class:
public class PropertyForeignKeyCollection : List<PropertyForeignKey> { }
I can do this:
PropertyForeignKeyCollection propertyForeignkeys = new
PropertyForeignKeyCollection();
propertyForeignkeys.add(...)
propertyForeignkeys.add(...)
propertyForeignkeys.add(...)
....
Now I want to clear the collection and use the object again.
Can I do this:
PropertyForeignKeyCollection propertyForeignkeys = new
PropertyForeignKeyCollection();
Will this create a new object and the old one will get taken care of by the
Garbage collector or do I need to get rid of it myself?
Thanks,
Tom
re-initialize it, can I just do a "new" again or do I need to get rid of it
first.
For example:
If I have a PropertyForeignKey class, which is just a list of properties and
I have another class:
public class PropertyForeignKeyCollection : List<PropertyForeignKey> { }
I can do this:
PropertyForeignKeyCollection propertyForeignkeys = new
PropertyForeignKeyCollection();
propertyForeignkeys.add(...)
propertyForeignkeys.add(...)
propertyForeignkeys.add(...)
....
Now I want to clear the collection and use the object again.
Can I do this:
PropertyForeignKeyCollection propertyForeignkeys = new
PropertyForeignKeyCollection();
Will this create a new object and the old one will get taken care of by the
Garbage collector or do I need to get rid of it myself?
Thanks,
Tom