--- auto/src/glewinfo_tail.c.orig
+++ auto/src/glewinfo_tail.c
@@ -448,7 +448,7 @@ GLboolean glewCreateContext (struct createParams *params)
   if (error) return GL_TRUE;
   error = CGLCreateContext(pf, NULL, &ctx);
   if (error) return GL_TRUE;
-  CGLReleasePixelFormat(pf);
+  CGLDestroyPixelFormat(pf);
   octx = CGLGetCurrentContext();
   error = CGLSetCurrentContext(ctx);
   if (error) return GL_TRUE;
@@ -462,7 +462,7 @@ GLboolean glewCreateContext (struct createParams *params)
 void glewDestroyContext ()
 {
   CGLSetCurrentContext(octx);
-  CGLReleaseContext(ctx);
+  CGLDestroyContext(ctx);
 }
 
 /* ------------------------------------------------------------------------ */
--- src/glewinfo.c.orig
+++ src/glewinfo.c
@@ -16731,7 +16731,7 @@ GLboolean glewCreateContext (struct createParams *params)
   if (error) return GL_TRUE;
   error = CGLCreateContext(pf, NULL, &ctx);
   if (error) return GL_TRUE;
-  CGLReleasePixelFormat(pf);
+  CGLDestroyPixelFormat(pf);
   octx = CGLGetCurrentContext();
   error = CGLSetCurrentContext(ctx);
   if (error) return GL_TRUE;
@@ -16745,7 +16745,7 @@ GLboolean glewCreateContext (struct createParams *params)
 void glewDestroyContext ()
 {
   CGLSetCurrentContext(octx);
-  CGLReleaseContext(ctx);
+  CGLDestroyContext(ctx);
 }
 
 /* ------------------------------------------------------------------------ */
--- src/visualinfo.c.orig
+++ src/visualinfo.c
@@ -1154,7 +1154,7 @@ GLboolean CreateContext (GLContext* ctx)
   if (error) return GL_TRUE;
   error = CGLCreateContext(pf, NULL, &ctx->ctx);
   if (error) return GL_TRUE;
-  CGLReleasePixelFormat(pf);
+  CGLDestroyPixelFormat(pf);
   ctx->octx = CGLGetCurrentContext();
   error = CGLSetCurrentContext(ctx->ctx);
   if (error) return GL_TRUE;
@@ -1165,7 +1165,7 @@ void DestroyContext (GLContext* ctx)
 {
   if (NULL == ctx) return;
   CGLSetCurrentContext(ctx->octx);
-  if (NULL != ctx->ctx) CGLReleaseContext(ctx->ctx);
+  if (NULL != ctx->ctx) CGLDestroyContext(ctx->ctx);
 }
 
 /* ------------------------------------------------------------------------ */
