boost库之scoped_array

// scoped_array_Exam.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include "boost/smart_ptr.hpp"
using namespace boost;

int _tmain(int argc, _TCHAR* argv[])
{
	// scoped_array包装了new[]操作符(不是单纯的new)在堆上分配的动态数组
	scoped_array<int> sa(new int[1000]);
	return 0;
}

你可能感兴趣的:(boost库之scoped_array)