Bump version to 4.1-6
[LibreOffice.git] / sal / rtl / alloc_fini.cxx
blob32c6fd5a59964424eec8136b1e85deb36bec08b3
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <rtl/instance.hxx>
22 #include "internal/rtllifecycle.h"
24 namespace
26 struct rtlMemorySingleton
28 rtlMemorySingleton()
30 rtl_memory_init();
32 ~rtlMemorySingleton()
34 rtl_memory_fini();
37 class theMemorySingleton
38 : public rtl::Static<rtlMemorySingleton, theMemorySingleton>{};
41 void ensureMemorySingleton()
43 theMemorySingleton::get();
46 namespace
48 struct rtlCacheSingleton
50 rtlCacheSingleton()
52 rtl_cache_init();
54 ~rtlCacheSingleton()
56 rtl_cache_fini();
59 class theCacheSingleton
60 : public rtl::Static<rtlCacheSingleton, theCacheSingleton>{};
63 void ensureCacheSingleton()
65 theCacheSingleton::get();
68 namespace
70 struct rtlArenaSingleton
72 rtlArenaSingleton()
74 rtl_arena_init();
76 ~rtlArenaSingleton()
78 rtl_arena_fini();
81 class theArenaSingleton
82 : public rtl::Static<rtlArenaSingleton, theArenaSingleton>{};
85 void ensureArenaSingleton()
87 theArenaSingleton::get();
90 namespace
92 struct rtlLocaleSingleton
94 rtlLocaleSingleton()
96 rtl_locale_init();
98 ~rtlLocaleSingleton()
100 rtl_locale_fini();
103 class theLocaleSingleton
104 : public rtl::Static<rtlLocaleSingleton, theLocaleSingleton>{};
107 void ensureLocaleSingleton()
109 theLocaleSingleton::get();
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */