471,310 Members | 1,026 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

A simple question about object re-initialization

think about we have a private hashtable object (variable)

we initialize the objects in some methods, now we create a cleanup
method, we can either new
1) hash = new HashTable();
2) hash.Clear();
is there any difference? on speed and resource allocation
I think for HashTable may be no different; what about a Disposable
Will the first way creates garbage if we don't dispose the existed

Feb 10 '06 #1
0 1032

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by jitya | last post: by
8 posts views Thread by Ross A. Finlayson | last post: by
7 posts views Thread by abcd | last post: by
73 posts views Thread by Claudio Grondi | last post: by
30 posts views Thread by Brian Elmegaard | last post: by
14 posts views Thread by Giancarlo Berenz | last post: by
30 posts views Thread by galiorenye | last post: by
10 posts views Thread by Phillip Taylor | last post: by
17 posts views Thread by Chris M. Thomasson | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.