|
-
January 26th, 2005, 04:13 PM
#1
Comparing objects in other languages to objects in C++/C#
We have Javascript and ASP which are also object oriented(comparing to C++/C#).
In Javascript, when we say:
Date date1=new Date();
a date object is allocated on the heap and its reference given to date1.
Similarly, in ASP, when we say:
connTemp=Server.CreateObject("adodb.connection")
The function CreateObject is creating an adodb connection object(on the heap), and returning the reference to connTemp.
I believe my summary is correct here?
Thinking on similar lines, what exactly happens when we create DOM objects in HTML/DHTML?
eg:
<form...>
<input type="button" name="button1">
</form>
Considering only the button object. When the interpreter processes this line of code, I believe that here also, the object is allocated on the heap(the object in turn may be invoking GDI components) and its reference returned. This causes us to see the button on the page.
Am I correct?
Thanks
Vikram
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|