struct UResourceBundle has a field ResourceData fResData, storing a copy of the .res file's low-level pointers etc. many times (in each bundle object created for each item). This is unnecessary, and during work on it became inconvenient (ResourceDataValue got changed from having a pResData pointer to a resData value).
Try to change the by-value fResData into a pointer, with the struct in only one place for each .res file. Also replace class ResourceDataValue.resData with a pointer again.