Page MenuHomePhabricator

efl-csharp: fix crash when events trigger after C# object `Dispose`
ClosedPublic

Authored by vitor.sousa on Apr 5 2019, 3:41 PM.

Details

Summary

Rework general event handling to check individually each event call, if the
object is not alive then the event will not be propagated.
WeakReferences (and lambdas capturing those WeakRefs) are used to ensure this.

Dispose methods in object now take care of checking if efl libraries are still
initialized and thread-safely unregister each event before performing an
efl_unref on the Eo object.

Event handling in C# is now centered around a single dictionary inside the
object: EoEvents.

C# event triggers now properly trigger events on C too.

Standardize C# event-triggering methods names (remove underscores).

Some diminished use of static memory due events no longer requiring static key
objects to be registered/unregistered.

Some fixing of white space generation for generated events.

Depends on D8431

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vitor.sousa created this revision.Apr 5 2019, 3:41 PM
vitor.sousa requested review of this revision.Apr 5 2019, 3:41 PM
vitor.sousa updated this revision to Diff 21242.Apr 5 2019, 3:49 PM

rework some useless code comments

lauromoura accepted this revision.Apr 5 2019, 3:51 PM
This revision is now accepted and ready to land.Apr 5 2019, 3:51 PM
This revision was automatically updated to reflect the committed changes.