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

3rd Party dll creating memory leek no dispose method for class

HI all

The problem is I have a 3rd party class that doesnt have a dispose
method. It has however a OpenConnection method and a CloseConnection
method but I call both of these and the class creates a memory leak. I
even set the object to Nothing afterwards but still the memory leek
appears. I have tried GC.Collect afterwards too but didnt help Here is
snippet of my code :
Dim mobjUDConn As connection '# this object is declared in 3rd party
DLL that is referenced
Dim mobjUDDB As connDatabase '# this object is declared in 3rd
party DLL that is referenced
'#SUB CONNECT
Dim ErrMsg As String
Try
If mobjUDConn Is Nothing Then
mobjUDConn = New connection
End If
If mobjUDConn.isConnected = False Then
With mobjUDConn
.Host = sHost
.Port = sPort
.User = sUser
.Password = sPassword
.Database = sDatabase
mobjUDConn.open()
End With
End If
If mobjUDDB Is Nothing Then
mobjUDDB = New connDatabase
End If
If mobjUDDB.isConnected = False Then
mobjUDDB = mobjUDConn.getDatabase
End If
ErrMsg = ""
Catch ex As Exception
ErrMsg = ex.Message
End Try

'# Thats it connection opened
'# Do reads / writes here

'##### Close Connection ####
mobjUDDB.close()
'# ##### PROBLEM HERE #######
'# Problem is here mobjUDDB doesnt have a dispose method
mobjUDConn.close()
mobjUDConn.Dispose()

mobjUDDB = Nothing
mobjUDConn = Nothing

Can anyone tell me what more can I do to kill the object mobjUDDB ???

Feb 22 '06 #1
0 848

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

Similar topics

16
by: Justin Lazanowski | last post by:
Cross posting this question on the recommendation of an I have a .NET application that I am developing in C# I am loading information in from a dataset, and then pushing the dataset to a grid,...
9
by: Mike P | last post by:
I know everything about reference counting and making sure you don't have large objects lying around. I have also profiled my app with multiple tools. I know about the fact GC collects memory but...
6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
17
by: José Joye | last post by:
Hi, I have implemented a Service that is responsible for getting messages from a MS MQ located on a remote machine. I'm getting memory leak from time to time (???). In some situation, it is...
25
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
7
by: Brano | last post by:
Hi all, I have a VB.NET Dll that is invoked via BizTalk 2002 AIC over Http protocol. the Dll is making a connection using a 3rd party connector to a Unidata database (old legacy stuff) All I...
4
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
3
by: =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno | last post by:
Could you advise me if there could be any memory leak in this C# code snippet?: http://pastebin.com/m2d2ded2d As I understand, I have closed all risky objects: EventWaitHandle, and Timer. Do...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.