473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Simple memory usage question

Hi,

A simple question...

This is just an example ... Say I have a class (MyClass) that has only
few variables (let's say 10 strings) but many-many-many subs and
fuctions, so many subs and functions that they take up 10k of memory.
The subs and fuctions creates no new variables.

Here's my question....

Will ....

Dim Class1 As New MyClass
Dim Class2 As New MyClass
Dim Class3 As New MyClass

Will they use 30k (due to the subs & functions) plus a small usage for
the 30 strings? .... or will they only use 10k plus a small usage for
the 30 strings?

In other words ... Will creating a new MyClass take 10k plus the strings
each time I create a new instance or will it only take 10k (plus the
strings) the first time I create an instance and all other instances
will use the same 10k of subs ans functions?

Than you!

M O J O

Nov 20 '05 #1
3 971
* M O J O <mojo@_no_spam_delete_this_newwebsolutions.dk> scripsit:
This is just an example ... Say I have a class (MyClass) that has only
few variables (let's say 10 strings) but many-many-many subs and
fuctions, so many subs and functions that they take up 10k of
memory. The subs and fuctions creates no new variables.

Here's my question....

Will ....

Dim Class1 As New MyClass
Dim Class2 As New MyClass
Dim Class3 As New MyClass

Will they use 30k (due to the subs & functions) plus a small usage for
the 30 strings? .... or will they only use 10k plus a small usage for
the 30 strings?


The latter.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Thanks Herfried!!

M O J O

Herfried K. Wagner [MVP] wrote:
* M O J O <mojo@_no_spam_delete_this_newwebsolutions.dk> scripsit:
This is just an example ... Say I have a class (MyClass) that has only
few variables (let's say 10 strings) but many-many-many subs and
fuctions, so many subs and functions that they take up 10k of
memory. The subs and fuctions creates no new variables.

Here's my question....

Will ....

Dim Class1 As New MyClass
Dim Class2 As New MyClass
Dim Class3 As New MyClass

Will they use 30k (due to the subs & functions) plus a small usage for
the 30 strings? .... or will they only use 10k plus a small usage for
the 30 strings?

The latter.


Nov 20 '05 #3
Hi, M O J O,

Thanks for using Microsoft MSDN Managed Newsgroup.

It seems you have got the answer by MVP Herfried's reply, If you more
concerns on this topic, please feel free to reply this message, I will find
someone to help you on your issue.

Thanks!
Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that,...
3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
6
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that,...
3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.