By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,290 Members | 1,303 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,290 IT Pros & Developers. It's quick & easy.

Memory managment.

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.