static void WeakReferenceCallback(v8::Persistent<v8::Value> object, void* parameter)
{
    InjectedScriptHost* nativeObject = static_cast<InjectedScriptHost*>(parameter);
    nativeObject->deref();
    object.Dispose();
    object.Clear();
}
예제 #2
0
void WeakHandleListener<StringCache, StringImpl>::callback(v8::Isolate* isolate, v8::Persistent<v8::Value> wrapper, StringImpl* stringImpl)
{
    V8PerIsolateData::current()->stringCache()->remove(stringImpl);
    wrapper.Dispose(isolate);
    wrapper.Clear();
    stringImpl->deref();
}
예제 #3
0
static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
{
    StringImpl* stringImpl = static_cast<StringImpl*>(parameter);
    V8PerIsolateData::current()->stringCache()->remove(stringImpl);
    wrapper.Dispose();
    wrapper.Clear();
    stringImpl->deref();
}
예제 #4
0
파일: Class.hpp 프로젝트: OrenMe/vu8
 static inline void MadeWeak(v8::Persistent<v8::Value> object,
                             void                     *parameter)
 {
     T *obj = static_cast<T *>(parameter);
     delete(obj);
     object.Dispose();
     object.Clear();
 }
예제 #5
0
void SimpleDecWrappedRefCount(Isolate* isolate, v8::Persistent<v8::Value> object, void *parameter){
	SMJS_BaseWrapped *wrapped = (SMJS_BaseWrapped*) parameter;
	if(--wrapped->refCount == 0){
		delete wrapped;
	}

	object.Dispose();
    object.Clear();
}
예제 #6
0
void
JSFeature::FreeFeatureCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    Feature* feature = static_cast<Feature*>(parameter);
    delete feature;

    object.Dispose();
    object.Clear();
}
예제 #7
0
void clrFuncProxyNearDeath(v8::Persistent<v8::Value> object, void* parameters)
{
    DBG("clrFuncProxyNearDeath");
    ClrFuncWrap* wrap = (ClrFuncWrap*)parameters;
    object.Dispose();
    object.Clear();
    wrap->clrFunc = nullptr;
    delete wrap;
}
예제 #8
0
void
JSFeatureProfile::FreeProfileCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    FeatureProfile* profile = static_cast<FeatureProfile*>(parameter);
    delete profile;

    object.Dispose();
    object.Clear();
}
예제 #9
0
void
JSFilterContext::FreeContextCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    FilterContext* context = static_cast<FilterContext*>(parameter);
    delete context;

    object.Dispose();
    object.Clear();
}
예제 #10
0
void
JSMapInfo::FreeMapInfoCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    Session* session = static_cast<Session*>(parameter);
    delete session;

    object.Dispose();
    object.Clear();
}
예제 #11
0
void
JSBounds::FreeBoundsCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    Bounds* bounds = static_cast<Bounds*>(parameter);
    delete bounds;

    object.Dispose();
    object.Clear();
}
예제 #12
0
void
JSVec3d::FreeVecCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    osg::Vec3d* v = static_cast<osg::Vec3d*>(parameter);
    delete v;

    object.Dispose();
    object.Clear();
}
예제 #13
0
void
JSSymbologyGeometry::FreeGeometryCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    osgEarth::Symbology::Geometry* geometry = static_cast<osgEarth::Symbology::Geometry*>(parameter);
    delete geometry;

    object.Dispose();
    object.Clear();
}
예제 #14
0
void
JSGeoExtent::FreeGeoExtentCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    osgEarth::GeoExtent* extent = static_cast<osgEarth::GeoExtent*>(parameter);
    delete extent;

    object.Dispose();
    object.Clear();
}
예제 #15
0
void
JSSpatialReference::FreeSpatialReferenceCallback(v8::Persistent<v8::Value> object, void *parameter)
{
    //osgEarth::SpatialReference* srs = static_cast<osgEarth::SpatialReference*>(parameter);
    //delete srs;
    osg::ref_ptr<osgEarth::SpatialReference> srs = static_cast<osgEarth::SpatialReference*>(parameter);

    object.Dispose();
    object.Clear();
}
예제 #16
0
void ObjectCache<K>::WeakCallback(v8::Persistent<v8::Value> object, void *parameter) {
  //called when only reference to object is weak - after garbage collection
  CallbackParameters<K> *params = (CallbackParameters<K>*) parameter;

  //remove it from the map
  params->cache->erase(params->key);

  //clear the reference to it
  object.Dispose();
  object.Clear();

  free(params);
}
예제 #17
0
파일: v8u.hpp 프로젝트: jmendeth/parport.js
template <class T> inline void ClearPersistent(v8::Persistent<T>& handle) {
  if (handle.IsEmpty()) return;
  handle.Dispose();
  handle.Clear();
}
예제 #18
0
void WeakHandleListener<DOMWrapperWorld>::callback(v8::Isolate* isolate, v8::Persistent<v8::Value> object, DOMWrapperWorld* world)
{
    object.Dispose(isolate);
    object.Clear();
    world->deref();
}
예제 #19
0
static void make_weak_callback(v8::Persistent<v8::Value> object, void *parameter) {
	object.Dispose(); // if there is no reference from js, surelly this can be disposed.
	object.Clear();
}
예제 #20
0
void WeakHandleListener<InjectedScriptManager, InjectedScriptHost>::callback(v8::Isolate* isolate, v8::Persistent<v8::Value> object, InjectedScriptHost* host)
{
    host->deref();
    object.Dispose(isolate);
    object.Clear();
}