why does RenderedFragment implement IDisposable? #782
Replies: 1 comment
-
Good question @SimonCropp. In general, back around the time when MobileBlazorBindings was under active dev I split bUnit into a core package and a web package. The idea was that if MBB turned into something, then there could be a bUnit.mobile package, etc.. So a bunch of design decisions were made that might not make as much sense today. That said, having a bunit.core package has meant that others have been able to publish extension packages to bunit that only need a dependency on bunit.core, and not bunit.web, which comes with its own list of external dependencies like AngleSharp. IIRC, I am using dispose to clear out any subscribers to the Could also be that there was something in there that previously was disposable, but have since been removed, but now we're stuck with it until V2 since removing it is a breaking change. |
Beta Was this translation helpful? Give feedback.
-
It doesnt have any instance properties that need to be cleaned up. may as well let it go out of scope and leave it to the GC since that will be the equivalent of the current code.
Beta Was this translation helpful? Give feedback.
All reactions