application.Render(16);
application.SendNotification();
- DALI_TEST_CHECK( application.GetGlAbstraction().CheckUniformValue( "sEffect", 1 ) );
+ GLuint programId, uniformId;
+ bool uniformWasSet = application.GetGlAbstraction().GetUniformIds( "sEffect", programId, uniformId );
+ // we dont care about the value of the sampler uniform as thats internal to DALi core and subject to change
+ DALI_TEST_CHECK( uniformWasSet );
END_TEST;
}
~TestBasicConnectionTrackerInterface()
{
- if( mCallback )
+ if( mSlotObserver && mCallback )
{
// Notify signal since the slot has been destroyed
mSlotObserver->SlotDisconnected( mCallback );
- delete mCallback;
+ // mCallback and mSlotObserver are not owned
}
}
if( mSlotObserver == slotObserver )
{
mSlotObserver = NULL;
-
- delete mCallback;
mCallback = NULL;
+ // mCallback and mSlotObserver are not owned
}
}
/**
* @brief Called when a signal is connected.
*
- * @param[in] slotObserver The slot observer i.e. a signal.
- * @param[in] callback The call back.
+ * @param[in] slotObserver The slot observer i.e. a signal. Ownership is not passed.
+ * @param[in] callback The call back. Ownership is not passed.
*/
virtual void SignalConnected( SlotObserver* slotObserver, CallbackBase* callback ) = 0;
mSignalObserver = NULL;
}
+ // we own the callback, SignalObserver is expected to delete the SlotConnection on Disconnected so its pointer to our mCallback is no longer used
+ delete mCallback;
mCallback = NULL;
}