Changeset View
Changeset View
Standalone View
Standalone View
languages/qmljs/libs/utils/autoreleasepool.h
- This file was added.
1 | /**************************************************************************** | ||||
---|---|---|---|---|---|
2 | ** | ||||
3 | ** Copyright (C) 2015 The Qt Company Ltd. | ||||
4 | ** Contact: http://www.qt.io/licensing | ||||
5 | ** | ||||
6 | ** This file is part of Qt Creator. | ||||
7 | ** | ||||
8 | ** Commercial License Usage | ||||
9 | ** Licensees holding valid commercial Qt licenses may use this file in | ||||
10 | ** accordance with the commercial license agreement provided with the | ||||
11 | ** Software or, alternatively, in accordance with the terms contained in | ||||
12 | ** a written agreement between you and The Qt Company. For licensing terms and | ||||
13 | ** conditions see http://www.qt.io/terms-conditions. For further information | ||||
14 | ** use the contact form at http://www.qt.io/contact-us. | ||||
15 | ** | ||||
16 | ** GNU Lesser General Public License Usage | ||||
17 | ** Alternatively, this file may be used under the terms of the GNU Lesser | ||||
18 | ** General Public License version 2.1 or version 3 as published by the Free | ||||
19 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | ||||
20 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | ||||
21 | ** following information to ensure the GNU Lesser General Public License | ||||
22 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | ||||
23 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||||
24 | ** | ||||
25 | ** In addition, as a special exception, The Qt Company gives you certain additional | ||||
26 | ** rights. These rights are described in The Qt Company LGPL Exception | ||||
27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||||
28 | ** | ||||
29 | ****************************************************************************/ | ||||
30 | | ||||
31 | | ||||
32 | #ifndef AUTORELEASEPOOL_H | ||||
33 | #define AUTORELEASEPOOL_H | ||||
34 | | ||||
35 | #import <Foundation/NSAutoreleasePool.h> | ||||
36 | | ||||
37 | namespace Utils { | ||||
38 | | ||||
39 | class AutoreleasePool | ||||
40 | { | ||||
41 | public: | ||||
42 | AutoreleasePool() { pool = [[NSAutoreleasePool alloc] init]; } | ||||
43 | ~AutoreleasePool() { [pool release]; } | ||||
44 | private: | ||||
45 | NSAutoreleasePool *pool; | ||||
46 | }; | ||||
47 | | ||||
48 | } // Utils | ||||
49 | | ||||
50 | #endif // AUTORELEASEPOOL_H | ||||
51 | |