92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
puts("Trying to resize NULL to 1024 bytes...");
p = [obj resizeMem: NULL
toSize: 1024];
[obj freeMem: p];
puts("Trying to resize memory that is not part of object...");
CATCH_EXCEPTION(p = [obj resizeMem: NULL + 1
toSize: 1024],
OFMemNotPartOfObjException)
/* TODO: Test if freeing object frees all memory */
return 0;
}
|
|
|
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
puts("Trying to resize NULL to 1024 bytes...");
p = [obj resizeMem: NULL
toSize: 1024];
[obj freeMem: p];
puts("Trying to resize memory that is not part of object...");
CATCH_EXCEPTION(p = [obj resizeMem: (void*)1
toSize: 1024],
OFMemNotPartOfObjException)
/* TODO: Test if freeing object frees all memory */
return 0;
}
|