Somewhat I want to implement reference counted pointers to works with a memory pool.

So instead of deleting the pointer, it's releasing memory from the pool.

Any suggestion, please?

Next, if anyone know any reference counting algorithms, please tell me..

Just lost in Google.