Make eBroadcast my Homepage | Contact Us   Return To The Main eBroadcast Homepage
Australia
Web Guide Search
Australia
Welcome It's
Australia
Australia
Web Guide: Encyclopedia
EBroadcast Australia
Powered by Wikipedia
Contents

Object creation

In computer science, object creation is the process of creating objects in object-oriented programming. It marks the onset of lifetime of an object.

In OOP, the meaning of creating objects is far more subtle than simple allocating of spaces for variables. First it is due to that in OOP, the lifetime of each object tends to vary more widely than in the case in conventional programming. There are a lot of subtle questions such as should the object considered alive in the process of creation or about the order of calling initializing code. In some sense, the creation can happen before the beginning of the program when objects are placed in a global scope.

In a typical case, the process follows:

  • calcuate the size of an object - the size is mostly the same as that of the class but can vary.
  • allocation - allocaing memory space with the size of an object plus the growth later, if possible to know in advance
  • binding methods
  • calling an initializing code of superclass
  • calling an initializing code of class being created

Those tasks can be completed at once but are sometimes left unfinished and the order of the tasks can vary and can cause several strange behavior. For example, in multi-inheritance[?], which initializing code should be called first is a difficult question to answer.

It is a complex problem how to create each object as element of an array. Most languages leave this to programmers.

Elsewhere
EBroadcast Australia
Search engine
Web directory

CONTENTS:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

Australia
eBroadcast Australia
Australia © 06 eBroadcast Australia | About eBroadcast | Legal Notices | Privacy Policy | Contact Us    Return To The Main eBroadcast Homepage