ptr.h: use unsigned int to store reference counts (in order to save memory).