Skip to main content
GameDev.net gamedev.net
🔒 Locked

methods in memory

Started by owl Jan 28, 2003 at 10:56 PM 1 replies 200+ views
Original Post
owl
owl
For c++ and/or Visual Basic. Is the machine code for the methods of a class stored in memory every time you instantiate an object of that class? Or is it stored just once no matter how many times you dinamically instantiate that object?
[size="2"]I like the Walrus best.
Zipster
Zipster
The machine code is stored once. It''s the context (the this pointer if you will) that allows the function to operate with different instances.
owl
owl
Thank you, I couldn''t remeber how that works.
[size="2"]I like the Walrus best.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.