by Dinesh Thakur Category: Object-oriented programming (OOP)

The Class_initialize event is triggered when an object is created and the Class_initialize event occurs when an object goes out of scope or is terminated with

 

Set ObjectName = Nothing. These event procedures are useful for doing any setup work for making sure that the memory allocated for an object is released.

 

Public Sub Class_Initialize()

‘ Create the collection object

Set mProducts = New Collection

End Sub

Public Sub Class_Terminate()

‘ Remove the collection from memory

Set mProducts = Nothing

End Sub

 



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.