FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using delegates as event handlers

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
Andrej08



Joined: 31 Aug 2010
Posts: 51

PostPosted: Tue Aug 31, 2010 7:37 pm    Post subject: Using delegates as event handlers Reply with quote

Hi,

In the tutorial it states "To be on the safe side, your event handler callback delegate should always be a class method / member function.".

Is this referring to D1 only? D2 uses the technique where a delegate can be used even if it refers to stack-alocated variables, because it copies the referred variables on the heap. So unless something else is at play, it should be safe to use any delegate, in D2 at least.

Let me know if I missed something. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group