As indicated in the comments, the exclamation mark is a C ++ / CLI marker for the finalizer method. Unlike traditional C ++ (~) destructors that are called when an object is explicitly deleted, finalizers are called by the garbage collector stream. You can see the official data here .
I would expect ILSpy to translate !KerningHelper()
to ~KerningHelper()
, since the C ++ / CLI finalizer is equivalent to C # destructor - this is a non-deterministic method that occurs when the GC gets to it, unlike explicit ~ C + + / CLI ~ destructor called when delete
called or an explicit call to Dispose.
source share