Commit 276de84a authored by jan.koester's avatar jan.koester
Browse files

test

parent b8a8a9e3
Loading
Loading
Loading
Loading
+12
Changes for src/connection.h: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -109,6 +109,18 @@ namespace netplus {
                p->~T();
            }

            T* allocate(size_t num) {
                if (num == 0)
                    return nullptr;
                T* ptr = (T*)malloc(num * sizeof(T));

                if (ptr == nullptr) {
                    throw std::bad_alloc();
            }

    return ptr;
}

            // deallocate storage p of deleted elements
            void deallocate (pointer p, size_type num) {
                ::operator delete((void*)p);