By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

Should I use OO?

P: n/a
Tim
I need some advice on how to approach a certain scenario, I have a
grid in which I will be adding and removing rows dynamically, I am
unsure if I should create rows as objects or just simply build the DOM
structure and append it?

I would prefer to go the OO route, but my main concern is creating
hundreds of instances of a object just floating around in memory. As
far as I know there is no way to destroy instances, so once a row is
removed the instance still exists, I don't know how garbage collection
works in modern browsers so maybe this isn't an issue.

I guess my real question is; do multiple instances take up memory or
slow the CPU?

Thanks
Feb 1 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Feb 1, 8:40 am, Tim <rozm...@gmail.comwrote:
I would prefer to go the OO route, but my main concern is creating
hundreds of instances of a object just floating around in memory. As
far as I know there is no way to destroy instances,
Check out the delete operator
http://developer.mozilla.org/en/docs...elete_Operator

A quick test in IE 7 and Firefox shows that it works at least with
arrays (sets the index value to undefined).
Feb 1 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.