'Class_Terminate' event is no longer supported
'Class_Terminate' event is no longer supported. Use 'Sub Finalize' to free resources.
The Class_Terminate
event of previous versions of Visual Basic is replaced by class destructors.
By default, this message is a warning. For information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.
Error ID: BC42002
To correct this error
- Declare a
Sub
procedure namedFinalize
to terminate a class.Sub Finalize
is called when the garbage collector detects that there are no more active references to the instance.
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for