TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ricardo Sousa
NA
3
0
Dispose
May 31 2009 9:37 PM
Hello;
I am trying to adapt a class to work with just finished that I am not able to solve the problem.
My question is how to identify the handle to close / / CloseHandle (handle).
My problem is that I am not able to adapt the following code.
for (Int32 i = 0; i < temp_items.Count; i++)
{
string conj_itens = temp_itens[i].ToString();
ContarSuporte cs= new ContarSuporte(matriz_bin,strExpr);
_cont = cs.Suporte;
If (_cont>100)
{
list.add(conj_itens);
}
}
public class ContarSuporte: IDisposable
{
private int _cont;
private bool disposed = false;
private IntPtr handle;
public ContarSuporte()
{
}
public ContarSuporte(DataTable matriz_binaria, string strExpr)
{
int c = matriz_binaria.Rows.Count;
this._cont = (int)(matriz_binaria.Compute("COUNT(TID)", strExpr));
}
~ContarSuporte()
{
Dispose(false);
}
public void Dispose()
{
//GC.Collect();
Dispose(true);
GC.SuppressFinalize(this);
// GC.Collect();
}
private void Dispose(bool disposing)
{
if (!this.disposed)
{
if (disposing)
{
//this.Dispose();
}
//CloseHandle(handle);
handle = IntPtr.Zero;
}
disposed = true;
}
public int Suporte
{
get
{
return _cont;
}
set
{
_cont =value;
}
}
Reply
Answers (
0
)
Recursive Search for part of filename
pyramid using c language