rspec/rules/S4583/description.adoc

8 lines
539 B
Plaintext
Raw Permalink Normal View History

2021-01-27 13:42:22 +01:00
Calling the ``++BeginInvoke++`` method of a delegate will allocate some resources that are only freed-up when ``++EndInvoke++`` is called. This is why you should always pair ``++BeginInvoke++`` with an ``++EndInvoke++`` to complete your asynchronous call.
2021-01-26 16:58:13 +01:00
2021-02-02 15:02:10 +01:00
2021-01-26 16:58:13 +01:00
This rule raises an issue when:
2021-01-27 13:42:22 +01:00
* the ``++BeginInvoke++`` method is called without any callback and it is not paired with a call to ``++EndInvoke++`` in the same block.
* a callback with a single parameter of type ``++IAsyncResult++`` doesn't contain a call to ``++EndInvoke++``.