Skip to content

Commit 4c9e109

Browse files
committed
TODO / WS
1 parent cd70897 commit 4c9e109

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

Zend/zend_lazy_objects.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ static void zend_lazy_object_info_dtor_func(zval *pElement)
6060

6161
if (info->flags & ZEND_LAZY_OBJECT_INITIALIZED) {
6262
ZEND_ASSERT(info->flags & ZEND_LAZY_OBJECT_STRATEGY_VIRTUAL);
63-
// TODO: GC?
64-
if (GC_DELREF(info->u.instance) == 0) {
65-
zend_objects_store_del(info->u.instance);
66-
}
63+
zend_object_release(info->u.instance);
6764
} else {
6865
zend_fcc_dtor(&info->u.initializer);
6966
}

Zend/zend_lazy_objects.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222
#include "zend.h"
2323

2424
/* Serialization skips initialization */
25-
#define ZEND_LAZY_OBJECT_SKIP_INITIALIZATION_ON_SERIALIZE (1<<0)
25+
#define ZEND_LAZY_OBJECT_SKIP_INITIALIZATION_ON_SERIALIZE (1<<0)
2626

2727
/* Lazy object is a virtual proxy */
28-
#define ZEND_LAZY_OBJECT_STRATEGY_VIRTUAL (1<<1)
28+
#define ZEND_LAZY_OBJECT_STRATEGY_VIRTUAL (1<<1)
2929

3030
/* Lazy object is a ghost object */
31-
#define ZEND_LAZY_OBJECT_STRATEGY_GHOST (1<<2)
31+
#define ZEND_LAZY_OBJECT_STRATEGY_GHOST (1<<2)
3232

3333
/* Lazy object is initialized (info.u is an instance) */
34-
#define ZEND_LAZY_OBJECT_INITIALIZED (1<<3)
34+
#define ZEND_LAZY_OBJECT_INITIALIZED (1<<3)
3535

36-
#define ZEND_LAZY_OBJECT_USER_FLAGS ( \
37-
ZEND_LAZY_OBJECT_SKIP_INITIALIZATION_ON_SERIALIZE | \
38-
ZEND_LAZY_OBJECT_STRATEGY_GHOST | \
39-
ZEND_LAZY_OBJECT_STRATEGY_VIRTUAL \
36+
#define ZEND_LAZY_OBJECT_USER_FLAGS ( \
37+
ZEND_LAZY_OBJECT_SKIP_INITIALIZATION_ON_SERIALIZE | \
38+
ZEND_LAZY_OBJECT_STRATEGY_GHOST | \
39+
ZEND_LAZY_OBJECT_STRATEGY_VIRTUAL \
4040
)
4141

4242
/* Temporarily allow raw access to the lazy object without triggering

0 commit comments

Comments
 (0)