8#ifndef INCLUDED_BSLMA_AUTODEALLOCATOR
9#define INCLUDED_BSLMA_AUTODEALLOCATOR
384#include <bslscm_version.h>
409template <
class ALLOCATOR>
419 ALLOCATOR *d_allocator_p;
476 template <
class TYPE>
478 ALLOCATOR *allocator,
481 ALLOCATOR *allocator,
542 template <
class TYPE>
543 void reset(TYPE **origin);
544 void reset(
void **origin);
568template <
class ALLOCATOR>
572 for (; d_length > 0; --d_length, ++d_origin_p) {
573 d_allocator_p->deallocate(*d_origin_p);
578 for (; d_length < 0; ++d_length, --d_origin_p) {
579 d_allocator_p->deallocate(*d_origin_p);
585template <
class ALLOCATOR>
588AutoDeallocator<ALLOCATOR>
589::AutoDeallocator(TYPE **origin,
590 ALLOCATOR *allocator,
592: d_origin_p((void **)origin)
594, d_allocator_p(allocator)
600template <
class ALLOCATOR>
604 ALLOCATOR *allocator,
608, d_allocator_p(allocator)
614template <
class ALLOCATOR>
626template <
class ALLOCATOR>
635template <
class ALLOCATOR>
644template <
class ALLOCATOR>
651template <
class ALLOCATOR>
658 d_origin_p =
static_cast<void **
>(origin);
661template <
class ALLOCATOR>
670template <
class ALLOCATOR>
681template <
class ALLOCATOR>
690#ifndef BDE_OPENSOURCE_PUBLICATION
695#ifdef bslma_AutoDeallocator
696#undef bslma_AutoDeallocator
699#define bslma_AutoDeallocator bslma::AutoDeallocator
Definition bslma_autodeallocator.h:410
void release()
Definition bslma_autodeallocator.h:646
void setLength(int length)
Definition bslma_autodeallocator.h:673
~AutoDeallocator()
Definition bslma_autodeallocator.h:616
void reset(TYPE **origin)
Definition bslma_autodeallocator.h:654
void operator++()
Definition bslma_autodeallocator.h:628
void operator--()
Definition bslma_autodeallocator.h:637
int length() const
Definition bslma_autodeallocator.h:683
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1917
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition baljsn_encoder_testtypes.h:76