VC6 Tips / VCでReleaseの設定でSTLPortを使用し、deallocateにてHeap corruption detected at ... とエラーになる場合の対処方法

VCでReleaseの時にのみ

Heap corruption detected at 009D1090
HEAP[foo.exe]: Invalid Address specified to RtlFreeHeap(

のエラーがデバッガに表示されたら
STLPortを使用している場合は

#define _STLP_NO_OWN_IOSTREAMS

を宣言すればよい。
 昔、よく嵌っていたのだが、数年ぶりにこのエラーになって対処の方法を忘れていたのでメモ。