From 0d2f9f05d2fdf31ca21e6e5795880f98dc38821a Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Mon, 20 Mar 2023 13:57:44 -0300 Subject: TProtocol: Add (and match) `operator delete()` It's exactly the same as `TObject::operator delete()`, not sure why this was even implemented. --- context.h | 2 ++ include/pso/TProtocol.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/context.h b/context.h index d7d27e8..3429793 100644 --- a/context.h +++ b/context.h @@ -1540,6 +1540,8 @@ public: int m_packet_size; struct packet m_packet; struct recv_packet_handlers m_recv_handlers; +private: + static void operator delete(void *ptr) { obj_heap->heap_free(ptr); }; public: TProtocol(TObject *parent, u16 sub_version, int language, char *serial_number, char *access_key, char *password); virtual ~TProtocol(); diff --git a/include/pso/TProtocol.h b/include/pso/TProtocol.h index d19b37d..6991c67 100644 --- a/include/pso/TProtocol.h +++ b/include/pso/TProtocol.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -157,6 +158,8 @@ public: int m_packet_size; struct packet m_packet; struct recv_packet_handlers m_recv_handlers; +private: + static void operator delete(void *ptr) { obj_heap->heap_free(ptr); }; public: TProtocol(TObject *parent, u16 sub_version, int language, char *serial_number, char *access_key, char *password); virtual ~TProtocol(); -- cgit v1.2.3-13-gbd6f