switch to general purpose allocator so we can weed out leaks

This commit is contained in:
Emil Lerch 2021-06-18 13:47:27 -07:00
parent 1050ca5222
commit 2768c83a0a
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -36,7 +36,13 @@ pub fn main() anyerror!void {
const test_json = false;
if (test_json) try jsonFun();
const allocator = std.heap.c_allocator;
const c_allocator = std.heap.c_allocator;
var gpa = std.heap.GeneralPurposeAllocator(.{}){
.backing_allocator = c_allocator,
};
defer if (!gpa.deinit()) @panic("memory leak detected");
const allocator = &gpa.allocator;
// const allocator = std.heap.c_allocator;
const options = aws.Options{
.region = "us-west-2",