3 ms·
I needed some time to think about your point. :) I'm not sure I understand the distinction. Why couldn't the parser maintaining that pool? If the two different
by munchbunny 7y ago
I needed some time to think about your point. :)
I'm not sure I understand the distinction. Why couldn't the parser maintaining that pool? If the two different projects (which I assume translates into two different object files or DLL's) belong in the same process, it's pretty straightforward for the parser to keep a singleton pool somewhere. If the two projects are in different processes, then it's probably better in terms of security to disallow sharing of that memory - and virtual memory spaces should abstract the space efficiency issues well enough for those purposes.
- benibela 7y agoThe problem is that the pool becomes too big and wastes memory It is fine when the user keeps opening files and the parser can reuse the objects. But eventually, the user has opened all the files he needs. Then the process will never open another file again, and none of the objects can be reused. But they also cannot be freed, when some objects are still used, e.g. when the user did not close all files.