Does someone know a good way to create a pool of objects containing really heavyweight objects?
I already tried it and it works so far, but my problem is, that each object needs to load the same huge model file for initialization (~200MB), so the initialization of the pool takes around two and a half minutes and takes a lot of memory.
Currently, I have an array of objects that will be filled with those objects by a for loop and I know about classes like GenericObjectPool
, but I don't think it would make a difference or am I wrong?