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

Re: Class internals


Have you got your answer?

If not can you be more precise about what part of your code you are talking
about ?

Fabien Bodard

Le mar. 29 sept. 2026, 21:59, Martin Cristia <tercoide@xxxxxxxxxxx> a
écrit :

> 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
>
>
>

Follow-Ups:
Re: Class internalsmartin <tercoide@xxxxxxxxxxx>