中EN

Dynamic Delegates

  • "Dynamic delegates can be serialized, their functions can be found by name, and they are slower than regular delegates."
  • Declare: DECLARE_DYNAMIC_DELEGATE_RetVal, ...; DECLARE_DYNAMIC_MULTICAST_DELEGATE_RetVal, ....
  • Bind: BindDynamic(UserObject, FuncName), AddDynamic(UserObject, FuncName), RemoveDynamic(UserObject, FuncName) — helper macros automatically generate the function name string.
  • Execute: Execute (no check), ExecuteIfBound, IsBound; executing an unbound delegate could scribble over memory; beware uninitialized output params with ExecuteIfBound.

引用这一章的笔记

输入关键词开始搜索

滚轮或双指缩放 · 拖动平移 · 双击放大 / 还原