aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/xdelta3/state/data_ptr.cpp
blob: a64af77124400cd2945e0f8af711828ea2491b7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "data_ptr.h"

namespace NXdeltaAggregateColumn {

    TDeleter::TDeleter(XDeltaContext* context)
        : Context(context)
    {
    }

    void TDeleter::operator()(ui8* ptr) const
    {
        if (!Context) {
            free(ptr);
            return;
        }
        Context->free(Context->opaque, ptr);
    }
}