Array of classes

  • Thread starter Thread starter hjackman
  • Start date Start date
H

hjackman

I have a class with several properties and methods that manipulate unmanaged
memory. When I need more memory, I simple create another class and add the
class to an array. My question is such: When I create a new instance of
the class, are the methods shared by all instances of the class or are they
also reallocated with each new instance of the class?
 
Im not to sure on the terminology included in your post, but I have
this code within my application to create a new instance of a form
class.

===================================
Dim Frm As New frmMain()
Me.AddOwnedForm(Frm)
Frm.Show()
===================================

and to cycle through the list of owned forms, just use a for loop sort
of like this:

===================================
Dim frm As frmMain
For Each frm In Me.OwnedForms

<Code to be executed in here>

Next frm
===================================


I hope that helps.
 
Back
Top