Add refheap support