Setting the class to null does NOT invoke the SPI class destructor right away. This happens at garbage collection time.
Try forcing garbage collection by calling Debug.GC(true). This will cause garbage collection to occur and the destructor of the SPI class to be called.