ResourceManagement: use raw pointer to resource data.

Avoid unnecessary copy, which caused ~1M of additional memory wasted.