avoid crash in threadpool if buffer data is gc'd