Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does inheritance help to make size of exe smaller?
Message
From
21/12/2007 09:52:53
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01276960
Message ID:
01276974
Views:
21
>>>I know that, in one way, inheritance is useful is eliminating a duplicate code. But I was wondering how much it is useful in terms of making the application .EXE smaller. Here is an example:
>>>Say I have a form class MyParent in one .vcx library.
>>>Then I create another .vcx library and store there a bunch of form classes like MyChild1, MyChild2, etc. all based on the class MyParent.
>>>If I didn’t have the MyParent class and simply created a bunch of form classes MyChild1, MyChild2, etc, would the size of the .EXE be much bigger?
>>
>>No,
>>When you build your application VFP automatically will add that class into the project.
>>If you hide it somehow you will not be able to compile your project.
>
>I probably didn't put my question correctly. What I meant is that instead of having forms MyChild1, MyChild2, etc. inheriting from the parent class MyParent, they will be based on the VFP base form class. That is, the second case would be not to use inheritance but to simply make each form MyChild1, MyChild2, etc. from scratch. Would this make the .exe much larger?

I think you can easily prove the exe would be larger. Make a screen with a method with 100K of source code in it. Copy that screen 4 times, you have 500K of source. If all of that code can be in a single class, you will drop 400K of code from the project.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform