memory leak fix (thx ketmar)

This commit is contained in:
Adam D. Ruppe 2016-06-09 13:24:46 -04:00
parent 4ad2206942
commit 4d9563e3b7
1 changed files with 3 additions and 0 deletions

View File

@ -4600,6 +4600,7 @@ version(X11) {
XDestroyImage(handle);
if(usingXshm) {
shmdt(shminfo.shmaddr);
shmctl(shminfo.shmid, IPC_RMID, null);
}
handle = null;
}
@ -5663,9 +5664,11 @@ enum : arch_ulong {
int shmget(int, size_t, int);
void* shmat(int, in void*, int);
int shmdt(in void*);
int shmctl (int shmid, int cmd, void* ptr /*struct shmid_ds *buf*/);
enum IPC_PRIVATE = 0;
enum IPC_CREAT = 512;
enum IPC_RMID = 0;
/* MIT-SHM end */