Make ProgramBinary a refcount object and use Binding pointers to maintain it's lifetime on context and program.

Trac #21270
Bug=351
Signed-off-by: Nicolas Capens

This fixes the underlying bug since it allows the context to keep the program binary alive, after a relink has occurred.



git-svn-id: https://angleproject.googlecode.com/svn/trunk@1242 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.h b/src/libGLESv2/Program.h
index b103b1c..9f7f07b 100644
--- a/src/libGLESv2/Program.h
+++ b/src/libGLESv2/Program.h
@@ -106,7 +106,7 @@
 
     AttributeBindings mAttributeBindings;
 
-    ProgramBinary* mProgramBinary;
+    BindingPointer<ProgramBinary> mProgramBinary;
     bool mLinked;
     bool mDeleteStatus;   // Flag to indicate that the program can be deleted when no longer in use