Merge pull request #16073 from neikeq/AaaaHH
Mono: Don't defer call to dispose queue objects when finalizing domain
This commit is contained in:
commit
a98e9496eb
@ -696,11 +696,13 @@ bool _GodotSharp::is_domain_loaded() {
|
|||||||
return GDMono::get_singleton()->get_scripts_domain() != NULL;
|
return GDMono::get_singleton()->get_scripts_domain() != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ENQUEUE_FOR_DISPOSAL(m_queue, m_inst) \
|
#define ENQUEUE_FOR_DISPOSAL(m_queue, m_inst) \
|
||||||
m_queue.push_back(m_inst); \
|
m_queue.push_back(m_inst); \
|
||||||
if (queue_empty) { \
|
if (queue_empty) { \
|
||||||
queue_empty = false; \
|
queue_empty = false; \
|
||||||
call_deferred("_dispose_callback"); \
|
if (!is_finalizing_domain()) { /* call_deferred may not be safe here */ \
|
||||||
|
call_deferred("_dispose_callback"); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
void _GodotSharp::queue_dispose(MonoObject *p_mono_object, Object *p_object) {
|
void _GodotSharp::queue_dispose(MonoObject *p_mono_object, Object *p_object) {
|
||||||
|
Loading…
Reference in New Issue
Block a user