I have seen some examples that after data is read using SqlCeResultSet that a Close is called.
Do I really need to call close? What are the drawbacks if I don't close it? (does something else bad happen? Do I get memory leaks?....)
I have seen some examples that after data is read using SqlCeResultSet that a Close is called.
Do I really need to call close? What are the drawbacks if I don't close it? (does something else bad happen? Do I get memory leaks?....)
Yes, you do need to Close your result sets; otherwise, you may leak native resources.
You should simply use a using block.
The drawback if you don't close the result set yourself is that the resources won't be freed until the garbage collector gets around to it. A lot of garbage collectors are lazy, so who knows when that will be!