Changeset 16cfd8c for src/examples/gc_no_raii/src/vector.c
- Timestamp:
- Apr 21, 2016, 4:54:33 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 8a74081
- Parents:
- 8c8b614
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/gc_no_raii/src/vector.c
r8c8b614 r16cfd8c 1 1 #include "vector.h" 2 3 #include <stdlib> 2 4 3 5 //------------------------------------------------------------------------------ 4 6 //Initialization 5 7 forall(otype T, otype allocator_t | allocator_c(T, allocator_t)) 6 void vector_ctor(vector(T, allocator_t) *const this)8 void ctor(vector(T, allocator_t) *const this) 7 9 { 8 10 ctor(&this->storage); … … 13 15 void dtor(vector(T, allocator_t) *const this) 14 16 { 17 clear(this); 15 18 dtor(&this->storage); 16 19 } … … 55 58 void dtor(heap_allocator(T) *const this) 56 59 { 57 free( (void*)this->storage);60 free(this->storage); 58 61 } 59 62
Note: See TracChangeset
for help on using the changeset viewer.