check the ref_cnt of pixmap before DestroyPixmap.