Hi guys,
I've searched around in books and on the web, but probably not good
enough because I haven't been able to find out what *exactly* the new
operator does; all sites and books explain it exclusively my example.
My underbelly feeling says that "new" creates a shallow copy of the
referenced object and then calls its constructor function, binding
"this" to the newly created copy, and returns the result of the
constructor function, if any, or its "this" object.
Does that make any sense? Is there any resource that I missed where
this is clarified? Thanks!
Egbert
I've searched around in books and on the web, but probably not good
enough because I haven't been able to find out what *exactly* the new
operator does; all sites and books explain it exclusively my example.
My underbelly feeling says that "new" creates a shallow copy of the
referenced object and then calls its constructor function, binding
"this" to the newly created copy, and returns the result of the
constructor function, if any, or its "this" object.
Does that make any sense? Is there any resource that I missed where
this is clarified? Thanks!
Egbert
Comment