Chapter 12 question
Hi, new member here... I have a question regarding the Favorites Viewer project, page 417. Specifically, the Using...End Using block is being used with the WebFavorite class. Is there any need for this, other than to show how to use it? The .NET garbage collector will automatically dispose of this object, correct?
Additionally, wouldn't it be better to make the Add property in WebFavoriteCollection class accept a reference parameter, so that every time a new WebFavorite instance is created, it will just pass a pointer to it, and we won't have to worry about all this?
Thanks for any enlightenment!
|