Class designed to store and invoke function pointers and method pointers
Revision 3:7e4f282982a6, committed 2011-12-09
- Comitter:
- Blaze513
- Date:
- Fri Dec 09 01:19:08 2011 +0000
- Parent:
- 2:6ad01486af99
- Commit message:
- Fixed problem with destructor deleting unallocated pointers
Changed in this revision
GenericFunctionHandler.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6ad01486af99 -r 7e4f282982a6 GenericFunctionHandler.h --- a/GenericFunctionHandler.h Tue Nov 29 05:50:25 2011 +0000 +++ b/GenericFunctionHandler.h Fri Dec 09 01:19:08 2011 +0000 @@ -52,8 +52,11 @@ ~GenericFunctionHandler() { - delete[] ObjectPointer; - delete[] MethodPointer; + if (FunctionPointerType) + { + delete[] ObjectPointer; + delete[] MethodPointer; + } } void Call()