2 [momiji music component library]
3 ---------------------------------------------------------------------
4 Momiji.Core.SafeBuffer.h
6 ---------------------------------------------------------------------
7 Copyright (C) 2011 tyiki badwell {miria@users.sourceforge.jp}.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.html>.
21 ---------------------------------------------------------------------
27 using namespace System::Runtime;
34 public ref class SafeBuffer:
35 public InteropServices::SafeBuffer
38 SafeBuffer(System::UInt32 size):
39 InteropServices::SafeBuffer(true)
41 this->Initialize(size);
45 [ConstrainedExecution::ReliabilityContract(ConstrainedExecution::Consistency::WillNotCorruptState, ConstrainedExecution::Cer::MayFail)]
46 virtual System::Boolean ReleaseHandle() override
49 System::Console::WriteLine("[{0}]",__FUNCTION__);