|
-
Mar 7th, 2001, 01:03 AM
#1
Thread Starter
New Member
Can this cause me a problem
This class declares
dim dbConnect as clsDatabaseAccess
set dbConnect = new clsDatabaseAccess
dbConnect.connect
dbConnect.execSQL
ProcessFile(dbConnect)
dbConnect.execSQL
dbConnect.disconnect
set dbConnect= Nothing
Public Function ProcessFile(ByRef objDB As clsDatabaseAccess)
objDB.execSQL
end sub
I don't know if this will cause a memory leak or not. I don't know what happens to the object passes as reference(objDB)
-
Mar 7th, 2001, 09:00 AM
#2
The only problem I see is that you are executing 3 times.
But, passing the object byref to a function won't cause a problem. Since it is byref, you don't have to close it in the function being called, just in the calling procedure.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|