Revert "start adding reference counter to resource management"

This reverts commit 0769fcc6e8195f07209554b9f79abb2d57f3cf43.