blob: d1830505058bf2c82c372481fed3db4f87dc2962 [file] [log] [blame]
K. Moon832a6942022-10-31 20:11:31 +00001// Copyright 2019 The PDFium Authors
Lei Zhangb6992dd2019-02-05 23:30:20 +00002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef TESTING_FREE_DELETER_H_
6#define TESTING_FREE_DELETER_H_
7
8#include <stdlib.h>
9
10namespace pdfium {
11
12// Used with std::unique_ptr to free() objects that can't be deleted.
13struct FreeDeleter {
14 inline void operator()(void* ptr) const { free(ptr); }
15};
16
17} // namespace pdfium
18
19#endif // TESTING_FREE_DELETER_H_