Hi All experts,
I am using a try/catch block to catch exceptions during a SQL insert operation. I want to prevent duplicates from being placed in the database and when the exception occurs the application should just continue. That part work fine but I am leaking memory.
If I "throw" in the catch block, no memory is lost, but if I only continue without calling "throw", I have 12 memory leaks ranging from 16 to 388 bytes each. I do not want to show a message everytime the DB prevents me from inserting a duplicate.
How should I handle the Exception without showing anything to the user and without leaking memory.
Thanks
deyzel
I am using a try/catch block to catch exceptions during a SQL insert operation. I want to prevent duplicates from being placed in the database and when the exception occurs the application should just continue. That part work fine but I am leaking memory.
If I "throw" in the catch block, no memory is lost, but if I only continue without calling "throw", I have 12 memory leaks ranging from 16 to 388 bytes each. I do not want to show a message everytime the DB prevents me from inserting a duplicate.
How should I handle the Exception without showing anything to the user and without leaking memory.
Thanks
deyzel