Mercurial > godwindows
changeset 85:e9b0b18f9360
Fix memory leak that isn't needed anymore since DW 2.6 maintains the string memory now.
author | Brian Smith <brian@dbsoft.org> |
---|---|
date | Sat, 10 Aug 2013 09:15:48 -0500 |
parents | ea538711664a |
children | 2237ef63fb69 |
files | src/dw/dw.go |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dw/dw.go Fri Jun 28 17:27:20 2013 -0500 +++ b/src/dw/dw.go Sat Aug 10 09:15:48 2013 -0500 @@ -4202,7 +4202,7 @@ func Container_set_row_title(contins HCONTINS, row int, title string) { ctitle := C.CString(title); C.dw_container_set_row_title(contins.ptr, C.int(row), ctitle); - /* TODO: Probably need to have a way to free this or leak */ + defer C.free(unsafe.Pointer(ctitle)); } // Sets the title of a row in the container. @@ -4212,7 +4212,7 @@ // Sets the pointer of a row in the container. func Container_set_row_data(contins HCONTINS, row int, data POINTER) { - C.dw_container_set_row_title(contins.ptr, C.int(row), (*C.char)(data)); + C.dw_container_set_row_data(contins.ptr, C.int(row), unsafe.Pointer(data)); } // Sets the pointer of a row in the container.