platform/shared/common/RhodesApp.cpp in rhodes-1.5.1 vs platform/shared/common/RhodesApp.cpp in rhodes-1.5.2
- old
+ new
@@ -610,27 +610,17 @@
String strRes = "__rho_object[" + strName + "]=" + convertToStringA(nIndex);
return strRes;
}
-void CRhodesApp::delCallbackObject(ICallbackObject* pCallbackObject)
-{
- for (int i = 0; i < (int)m_arCallbackObjects.size(); i++)
- {
- if ( m_arCallbackObjects.elementAt(i) == pCallbackObject )
- {
- m_arCallbackObjects.setElementAt(0,i);
-// rho_ruby_releaseValue(valObject);
- }
- }
-}
-
unsigned long CRhodesApp::getCallbackObject(int nIndex)
{
if ( nIndex < 0 || nIndex > m_arCallbackObjects.size() )
return rho_ruby_get_NIL();
ICallbackObject* pCallbackObject = m_arCallbackObjects.elementAt(nIndex);
+ m_arCallbackObjects.setElementAt(0,nIndex);
+
if ( !pCallbackObject )
return rho_ruby_get_NIL();
return pCallbackObject->getObjectValue();
}