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
Daniel van Pletzen
NA
25
0
stoping delegate from getting gc'ed
Aug 1 2007 4:38 PM
Hi, using a delegate to handle an event im getting from an api call, only problem is its being destroyed by GC and not sure how to stop this ..
private delegate void StartStopEventDelegate(short Channel, short Event);
[DllImport("c:\\mydll.dll")]
private static extern char SetCallBack_StartStop(StartStopEventDelegate myDelegate);
then use of above code which is done i
SetCallBack_StartStop(startstop);
void startstop(short channel, short event)
{
//lotsa stuff here
}
after i force GC or wait for GC i get
A callback was made on a garbage collected delegate of type
please help
Reply
Answers (
3
)
Minimize number of forms
How to read email from Microsoft Exchange Server 2003 using MAPI and C#