Closed ynh-zz closed 8 years ago
Looks good to me :-) @mkovatsc, since it affects the area of code that you seem to be most familiar with, I think it should be you making the call and merge it to master. I think we should include this in 1.0.0, shouldn't we?
Yes, Yassin is actually a student of mine and he told me about this fix. Thanks for triggering me again :) Looks also fine to me.
In the current implementation unused Endpoints and CoAPServers are not garbage collected. This due to the config observe relation between the default
NetworkConfig
and the layers (ReliabilityLayer
andBlockwiseLayer
).Reference chain: static
NetworkConfig.default
>NetworkConfig
>BlockwiseLayer
>ObserveLayer
>StackTopAdapter
(inner class of)CoapStack
>OutboxImpl
(inner class of)CoapEndpoint
>ServerMessageDeliverer
>RootResource
(inner class of)CoapServer
Test code:Before fix:
After fix: