Hello all,
I'm trying to do something which may be impossible, but I wonder if any of you can help out?
My program will create many instances of a class that I am creating, but a key part of the class will be a binary series/array which can vary widely in size. It seems silly to allocate the worst case scenario memory (10k plus) to every one, when sometimes only a few bytes will be enough. I will know the size required at the creation of each instance.
Any ideas?
I'm trying to do something which may be impossible, but I wonder if any of you can help out?
My program will create many instances of a class that I am creating, but a key part of the class will be a binary series/array which can vary widely in size. It seems silly to allocate the worst case scenario memory (10k plus) to every one, when sometimes only a few bytes will be enough. I will know the size required at the creation of each instance.
Any ideas?