[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Class internals


Hi Benoit and all gambers. Silly question:

If I create a Class that depicts something like a shape for 3D drawing and add some Functions to it, when replicated for thousands or millions, all is copied or just the fields/properties? Like:

' some  code

Public shapes as New Shape[]

Public s as Shape

For i=1 to 1000000

   s = New Shape

   shapes.Add(s)

Next


'Class Shape

Public vertex as Float[]

Public Id as Integer


' is this code created once or for every Shape object?

Public Function Draw(s as Shape)

. ' code for doing things

End


Public Function SaveShape(s as Shape)

' cpde for saving shape on disk

End


References:
New warning from compiler about loop variablesBrian G <brian@xxxxxxxxxxxxxxxx>