Temporary hack to enable GC for both ref and obj.