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

'new Object();' question.

P: n/a
cjl
Hey all:

What happens if I have:

monkey = new Object();

I go on to set some properties, etc., then later call:

monkey = new Object();

again? Is this bad mojo? Frowned upon? Stupid? A source of memory
leaks?

Thanks in advance,
-CJL

Oct 9 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
cjl wrote:
Hey all:

What happens if I have:

monkey = new Object();

I go on to set some properties, etc., then later call:

monkey = new Object();

again? Is this bad mojo? Frowned upon? Stupid? A source of memory
leaks?

Thanks in advance,
-CJL


All of the modifications that you made to the previous monkey will be
forgotten. Sometimes that is desirable. It is only stupid if that
wasn't your intention.

http://www.crockford.com/javascript
Oct 9 '05 #2

P: n/a
cjl
Douglas:

That is what I was hoping would happen.

Thank you!

-CJL

Oct 9 '05 #3

P: n/a
"cjl" <cj****@gmail.com> writes:
Douglas:

That is what I was hoping would happen.

Thank you!

-CJL


To quote Randy Webb:
--
Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.
--
Thanks :)
--
Arnaud DIEDEREN
Software Developer
IONIC Software
Rue de Wallonie, 18 - 4460 Grace-Hollogne - Belgium
Tel: +32.4.3640364 - Fax: +32.4.2534737
mailto:ad@ionicsoft.com
http://www.ionicsoft.com
Oct 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.