IonicWind Software

Aurora Compiler => General Discussion => Topic started by: John S on February 14, 2007, 11:55:52 AM

Title: question about classes and subclasses
Post by: John S on February 14, 2007, 11:55:52 AM
What is the difference execution wise between the following:

First example

class SomeBaseClass
{
  // a lot of something here
}

class SomeChildClass : SomeBaseClass
{
  // some more stuff here
}



Second example

class SomeBaseClass
{
  // a lot of something here
}

class SomeOtherClass
{
  SomeBaseClass BaseClassObject;

  // some more stuff here
}


In both examples there is inheritance, etc.  Which codes more efficiently?  This is relevant to the Vector/Array stuff I've been working on.
Title: Re: question about classes and subclasses
Post by: Ionic Wind Support Team on February 14, 2007, 01:02:51 PM
Both examples are not inheritance.  Only the first one is.

In the second example you have a member variable of some other class, which is slightly longer codewise when you execute a method in the member variable.
Title: Re: question about classes and subclasses
Post by: John S on February 14, 2007, 01:04:50 PM
Thanks for the quick response, Paul.