OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Scopers help you manage ownership of a pointer, helping you easily manage the | 5 // Scopers help you manage ownership of a pointer, helping you easily manage the |
6 // a pointer within a scope, and automatically destroying the pointer at the | 6 // a pointer within a scope, and automatically destroying the pointer at the |
7 // end of a scope. There are two main classes you will use, which coorespond | 7 // end of a scope. There are two main classes you will use, which coorespond |
8 // to the operators new/delete and new[]/delete[]. | 8 // to the operators new/delete and new[]/delete[]. |
9 // | 9 // |
10 // Example usage (scoped_ptr): | 10 // Example usage (scoped_ptr): |
11 // { | 11 // { |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 375 } |
376 | 376 |
377 template<class C, class FP> inline | 377 template<class C, class FP> inline |
378 bool operator!=(C* p, const scoped_ptr_malloc<C, FP>& b) { | 378 bool operator!=(C* p, const scoped_ptr_malloc<C, FP>& b) { |
379 return p != b.get(); | 379 return p != b.get(); |
380 } | 380 } |
381 | 381 |
382 } // namespace gpu | 382 } // namespace gpu |
383 | 383 |
384 #endif // GPU_COMMAND_BUFFER_COMMON_SCOPED_PTR_H_ | 384 #endif // GPU_COMMAND_BUFFER_COMMON_SCOPED_PTR_H_ |
OLD | NEW |