In GCC's xml resource loader, the raw buffer containing the xml file is discarded. However, an empty buffer for the processed data is allocated with the same capacity as that for the raw xml.
After the xml has been parsed, the handle still retains this empty buffer to processed data. Shouldn't it be deleted, so that it only contains the root node of the xml (the only useful information)?
I was thinking about how to handle JSON resources. In cases like this where the useful information is contained only in the handle's ResourceExtraData, the resource cache currently doesn't account for the memory used by that extra information. Should I be overly concerned about this?
Finally, where can I find out more about extending the cache so that it preallocates memory at initialization and hands it out when loading resources? or about caching for games more generally? A google yielded boost.pool; would that be a good solution?
After the xml has been parsed, the handle still retains this empty buffer to processed data. Shouldn't it be deleted, so that it only contains the root node of the xml (the only useful information)?
I was thinking about how to handle JSON resources. In cases like this where the useful information is contained only in the handle's ResourceExtraData, the resource cache currently doesn't account for the memory used by that extra information. Should I be overly concerned about this?
Finally, where can I find out more about extending the cache so that it preallocates memory at initialization and hands it out when loading resources? or about caching for games more generally? A google yielded boost.pool; would that be a good solution?