Use NSAllocateCollectable() for some things that store pointers.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33106 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-05-24 16:37:26 +00:00
parent c03b2d3a3b
commit 1b26d9be44

View file

@ -759,7 +759,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
root = [self _rootWindowForScreen: defScreen];
context = [self xrContextForScreen: defScreen];
window = malloc(sizeof(gswindow_device_t));
window = NSAllocateCollectable(sizeof(gswindow_device_t), NSScannedOption);
memset(window, '\0', sizeof(gswindow_device_t));
window->display = dpy;
window->screen = defScreen;
@ -1312,7 +1312,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
if (window)
return window;
window = malloc(sizeof(gswindow_device_t));
window = NSAllocateCollectable(sizeof(gswindow_device_t), NSScannedOption);
memset(window, '\0', sizeof(gswindow_device_t));
window->display = dpy;
@ -1943,7 +1943,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
/* Create the window structure and set the style early so we can use it to
convert frames. */
window = malloc(sizeof(gswindow_device_t));
window = NSAllocateCollectable(sizeof(gswindow_device_t), NSScannedOption);
memset(window, '\0', sizeof(gswindow_device_t));
window->display = dpy;
window->screen = screen;
@ -2162,7 +2162,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
/* Create the window structure and set the style early so we can use it to
convert frames. */
window = malloc(sizeof(gswindow_device_t));
window = NSAllocateCollectable(sizeof(gswindow_device_t), NSScannedOption);
memset(window, '\0', sizeof(gswindow_device_t));
window->display = dpy;
window->screen = *screen;