OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
542 template <class S, class M2> | 542 template <class S, class M2> |
543 V8_INLINE(Persistent& operator=(const Persistent<S, M2>& that)) { // NOLINT | 543 V8_INLINE(Persistent& operator=(const Persistent<S, M2>& that)) { // NOLINT |
544 Copy(that); | 544 Copy(that); |
545 return *this; | 545 return *this; |
546 } | 546 } |
547 /** | 547 /** |
548 * The destructor will dispose the Persistent based on the | 548 * The destructor will dispose the Persistent based on the |
549 * kResetInDestructor flags in the traits class. Since not calling dispose | 549 * kResetInDestructor flags in the traits class. Since not calling dispose |
550 * can result in a memory leak, it is recommended to always set this flag. | 550 * can result in a memory leak, it is recommended to always set this flag. |
551 */ | 551 */ |
552 V8_INLINE(~Persistent()) { | 552 // V8_INLINE(~Persistent()) { |
Dmitry Lomov (no reviews)
2013/09/09 11:38:49
Since it is a public API, please remove completely
| |
553 if (M::kResetInDestructor) Reset(); | 553 // if (M::kResetInDestructor) Reset(); |
554 } | 554 // } |
555 | 555 |
556 /** | 556 /** |
557 * If non-empty, destroy the underlying storage cell | 557 * If non-empty, destroy the underlying storage cell |
558 * IsEmpty() will return true after this call. | 558 * IsEmpty() will return true after this call. |
559 */ | 559 */ |
560 V8_INLINE(void Reset()); | 560 V8_INLINE(void Reset()); |
561 template <class S> | 561 template <class S> |
562 /** | 562 /** |
563 * If non-empty, destroy the underlying storage cell | 563 * If non-empty, destroy the underlying storage cell |
564 * and create a new one with the contents of other if other is non empty | 564 * and create a new one with the contents of other if other is non empty |
(...skipping 5865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6430 */ | 6430 */ |
6431 | 6431 |
6432 | 6432 |
6433 } // namespace v8 | 6433 } // namespace v8 |
6434 | 6434 |
6435 | 6435 |
6436 #undef TYPE_CHECK | 6436 #undef TYPE_CHECK |
6437 | 6437 |
6438 | 6438 |
6439 #endif // V8_H_ | 6439 #endif // V8_H_ |
OLD | NEW |