473,395 Members | 1,761 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,395 software developers and data experts.

Memory managment.

Newbie question:

If I build a dll, how do I create a dispose method for it? Is it as
simple as adding the following code?

Public Overloads Overrides Sub Dispose()
MyBase.Dispose()
components.Dispose()
End Sub
I have several classes that pass back delegates and they all seem to
work great but I cannot figure out how to dispose of my classes after I
substanciated them.

-Peter

Nov 21 '05 #1
2 925
Sample Class: Here is a class function that returns a function. Do I
need to do any special to this class?

imports whitecliff.webzinc

Public Class SuckWebpages
dim z as new webzinc

....New(url as string)

public function getpagesplit() as string() 'rawhtml
dim returnPageLines as string()
returnPageLines = split(z.openpage(url), controlchars.newline)
z.dispose
return returnPageLines

end sub
end class

Nov 21 '05 #2
"pmclinn" <pm*****@gmail.com> schrieb:
Sample Class: Here is a class function that returns a function. Do I
need to do any special to this class?

imports whitecliff.webzinc

Public Class SuckWebpages
dim z as new webzinc

...New(url as string)

public function getpagesplit() as string() 'rawhtml
dim returnPageLines as string()
returnPageLines = split(z.openpage(url), controlchars.newline)
z.dispose
return returnPageLines


In this case there is no need for implementing 'IDisposable' as far as I
see.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

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

Similar topics

1
by: D. Buck | last post by:
Details: MS SQL 2000 dual Intel 1.2 GHz processors. 1 GB RAM 2.1 GB dB Dynamic Memory Managment. No other apps running on this server. First question: Since I have Dynamic Memory Managment...
3
by: Yves Dhondt | last post by:
Hello, I'm looking for information about the loading/unloading of unmanaged dlls. Using the debugger I think it works as follows : the unmanaged DLL is loaded as soon as a call to one of it's...
2
by: Matthias Kwiedor | last post by:
Hi! I have a small ;) application which needs just to load up the Main Form 40MB (there is a IE Instance implementet). After that i managed with own Memory Managment to need just 10 to 20MB more...
7
by: Casey Leamon | last post by:
I've been noticing that all of my .NET apps seem to progressivly use more and more memory. Even after several reworks of the code I can only manage to slow the growth. Is there some Garbage...
1
by: LP | last post by:
Hello .NET experts A group of develpers here are having some arguements about different ways to write program with minimal memory footprint. One method in buisness class creates an instance of...
1
by: Ashish | last post by:
hi all we have tested out web site for performance and we observed that the asp.net process does disposes memory ( as opposed to my earlier observation ), i was just curious if the asp.net...
18
by: CJ Taylor | last post by:
If I wanted to find out exactly how much memory a particular variable was using, how would I go about that. Or where to look for information would be appreciated. Just need a class/namespace ...
13
by: Nikolay Petrov | last post by:
I've got this issue: When I start my application it takes a lot of memory. I guess this is caused by CLR. That's fine. But every time the app performs an action (open new form, load data in...
1
by: bsimon | last post by:
I've read in the doc that every memory allocation done in a spi memory context was freed at the end of the context (after spi_finish) What happens if the context is is initialized inside another...
2
by: Daniel | last post by:
Hi, I have a question regarding the memory managment in stl stacks. I want to use stacks to store a very large amount of numbers (some millions), thus I'm interested in how the stack behaves...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.