Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / stlalgorithm.hxx
blobfb5509f50f9c6e24448074903793dae4515d8349
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef __SC_STLALGORITHM_HXX__
11 #define __SC_STLALGORITHM_HXX__
13 #include <functional>
15 /**
16 * Function object to allow deleting instances stored in STL containers as
17 * pointers.
19 template<typename T>
20 struct ScDeleteObjectByPtr : public ::std::unary_function<T*, void>
22 void operator() (T* p)
24 delete p;
28 #endif
30 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */