If anybody could add some clarification on this:
are enumerations and const members in classes allocated once over the lifetime of a program or are they allocated each time a new instance of the class is created?
I am dealing with the following problem:
In a file, there are several records - 122 of them. I've added an enumeration which specifies their names, for easy array access. Now, this enumeration is defined in the File class, rather than in the record class and it seems to be against the nature of things. I was thinking that the enumeration would be actually allocated as a 122 integer array or something like that (right or wrong?) and I was considering what would happen in the case when a file contains 10.000 records.
But, if the enumerations are placed in a separate memory area and only allocated once, there is no memory problem.
So, can anybody enlighten me on this issue? [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
are enumerations and const members in classes allocated once over the lifetime of a program or are they allocated each time a new instance of the class is created?
I am dealing with the following problem:
In a file, there are several records - 122 of them. I've added an enumeration which specifies their names, for easy array access. Now, this enumeration is defined in the File class, rather than in the record class and it seems to be against the nature of things. I was thinking that the enumeration would be actually allocated as a 122 integer array or something like that (right or wrong?) and I was considering what would happen in the case when a file contains 10.000 records.
But, if the enumerations are placed in a separate memory area and only allocated once, there is no memory problem.
So, can anybody enlighten me on this issue? [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro