As Hans has pointed out in their comments, you can dispose the handle with delete handle
.
The Visual Studio will complain that the expression must have pointer or handle type
, but the code will compile and run without problems.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…