Add ref count check in pipe line , avoiding runtime-crash in 7*24 hours stability test