|
by: celeong |
last post by:
Hi, anybody can help me with this.
I've created a singleton class, and now wants to add destructor to it.
I know we can implement the IDisposable and also overrides the Finalize
method (from the MSDN example). But is it possible that we just implement
the Dispose method, which we will call at the end of the application?
Will there be any memory leak or side effects?
|
by: Joe Abou Jaoude |
last post by:
I m preparing to pass the 70-306 exam, so i downloaded Q & A
from multiple sites.
There's this question that really confuses me, coz i see that both
answers A and C are both correct.
Can anyone help me to pick the right answer and explain me why ?
thx.
Your development team creates an order entry application by using
Visual Studio .NET. The application stores and retrieves data in a
|
by: Charles Law |
last post by:
I have an application that creates a class. The class has unmanaged
resources, so must end gracefully.
How can I guarantee that the unmanaged resources are freed?
I have looked at IDisposable, but this seems to rely on a call from the
application, e.g.
MyClass.Dispose()
|
by: Joe Abou Jaoude |
last post by:
hi,
I have a component that uses a database connection.
In the finalizer I dispose the connection because I read in msdn the
following:
"A type must implement Finalize when it uses unmanaged resources such as
file handles or database connections that must be released when the
managed object that uses them is reclaimed."
|
by: Larry Lard |
last post by:
I still don't really 'get' this. Why can't an object just release its
resources in its Finalize method? Why when I create (eg) a Graphics
object does it become *my* responsibility to say when I've finished
with it, and explcitly say so? I thought one of the points of managed
memory / garbage collection was that users of objects didn't have to
worry about tracking object lifetime?
What's the point of me saying g.Dispose at the end of my...
|
|
by: SalamElias |
last post by:
I started to use the Finalize sub in aspax page, I put a break point on one
of the lines, hit run with debug, the pages dispalys without breaking on the
line.
2nd question, do we need to use the keyword "set" as normal vb to set an
object to nothing or it is enough todo the following
"myobject = nothing"
instead of
"set myobject = nothing "
Thanks
|
by: BLUE |
last post by:
I've read many articles including the one from Duff's blog but I've many
doubts.
public static myClass Instance
{
get
{
if (myClass.instance == null)
myClass.instance = new myClass();
|
by: dmjpro |
last post by:
i know that the finalize method is called by JVM when an object is garbage collected.
right???
but the ultimate memory release done by native OS.
now my confusion is ... when it is called in reality?????
have a look at my code .....
|
by: Barry Flynn |
last post by:
VB 2005.
I have the following code in a Sub.
Dim oFred As SillyClass
oFred = New SillyClass
oFred.Gloop()
oFred = Nothing
Exit Sub
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|