New file of C++ utilities, including stack-based autorelease pool creator.

This commit is contained in:
smfr%smfr.org 2005-07-24 23:02:55 +00:00
Родитель af496b2d1a
Коммит f6372a1cc1
2 изменённых файлов: 82 добавлений и 0 удалений

Просмотреть файл

@ -1577,6 +1577,27 @@
settings = {
};
};
0FC4B33D08941B4F009C5F41 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = ChimeraUtils.h;
path = src/includes/ChimeraUtils.h;
refType = 2;
sourceTree = SOURCE_ROOT;
};
0FC4B33E08941B4F009C5F41 = {
fileRef = 0FC4B33D08941B4F009C5F41;
isa = PBXBuildFile;
settings = {
};
};
0FC4B33F08941B4F009C5F41 = {
fileRef = 0FC4B33D08941B4F009C5F41;
isa = PBXBuildFile;
settings = {
};
};
0FCCE56707D6D7DA006DD3D1 = {
isa = PBXFileReference;
lastKnownFileType = file;
@ -2597,6 +2618,7 @@
0F5FD71C07F48CDC00E8EDBD,
3FFFEC1E081C3F0B00843C07,
0F84BF1808862E4B00E23BC4,
0FC4B33E08941B4F009C5F41,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@ -6446,6 +6468,7 @@
0F5FD71D07F48CDC00E8EDBD,
3FFFEC20081C3F0B00843C07,
0F84BF1708862E4B00E23BC4,
0FC4B33F08941B4F009C5F41,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@ -13136,6 +13159,7 @@
F558B1F0030F6E470166970F,
F5DE10E80209DC0601A967DF,
F5DE10E70209DC0601A967DF,
0FC4B33D08941B4F009C5F41,
F5C8D55203A2A42401A8016F,
F566BD1202EFA9AD01A967F3,
F59E9F3D0237E28401A967DF,

Просмотреть файл

@ -0,0 +1,58 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Chimera code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Simon Fraser <smfr@smfr.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <Foundation/Foundation.h>
class StAutoreleasePool
{
public:
StAutoreleasePool()
{
mPool = [[NSAutoreleasePool alloc] init];
}
~StAutoreleasePool()
{
[mPool release];
}
protected:
NSAutoreleasePool* mPool;
};