xamarin-macios/tests/bindings-test
Rolf Bjarne Kvinge 2fe44b9890
[ObjCRuntime] Don't double-retain blocks. (#3717)
* [ObjCRuntime] Don't double-retain blocks.

First there was darkness; no blocks were retained.

Then came the light; and all blocks were retained [1]

Forever.

But all that once is, must one day not be,
and thus the light gave way to darkness,
and blocks were only retained as long as need be [2].

But before there was a balance, there was a crossroad.

In some places the light shone forever,
and all blocks were retained.

In other places there was a balance,
and the light shone only as long as needed.

A desire to unify arose.

Alas, it could not be.

It was a bright and sunny day

When a merge failed [3].

And all blocks were retained. Twice.

Once [here][4] and once [there][5].

For many years we could not see.

Until a dark and rainy night,
when an awareness arose.

And the desire to unify the balance could finally be fulfilled.

[1]: 6efca92acb
[2]: a22f877539
[3]: befa0477cf
[4]: 5158a3c001/src/ObjCRuntime/Runtime.cs (L858)
[5]: 5158a3c001/runtime/runtime.m (L2091)

* [tests] Fix test builds.

* [monotouch-test] RegistrarTest.BlockCollection: allocate more and wait longer for the GC.

Allocate more objects and wait longer for the GC to run.

Hopefully fixes this problem:

    	[FAIL] RegistrarTest.BlockCollection :   freed blocks
      Expected: greater than 0
      But was:  0

The blocks are freed if we just wait long enough... The problem is that we
don't want to wait very long (makes the tests slow to run), so try to speed
things up by allocating more.
2018-03-13 12:30:32 +01:00
..
ApiDefinition.cs [ObjCRuntime] Don't double-retain blocks. (#3717) 2018-03-13 12:30:32 +01:00
ApiProtocol.cs Revert "[macOS][msbuild] Fix binding projects under Full to resolve to correct libs (#3672)" (#3727) 2018-03-13 10:38:14 +01:00
ProtocolTest.cs [tests] Fix ProtocolTest to work with in both monotouch-test and linkall. (#3598) 2018-02-26 17:37:09 +01:00
RegistrarBindingTest.cs [ObjCRuntime] Don't double-retain blocks. (#3717) 2018-03-13 12:30:32 +01:00
StructsAndEnums.cs Optimize calls to BlockLiteral.SetupBlock to inject the block signature. (#3391) 2018-02-06 07:08:15 +01:00
bindings-test-mac.csproj [ObjCRuntime] Don't double-retain blocks. (#3717) 2018-03-13 12:30:32 +01:00
bindings-test.csproj [static registrar] Optimize creation of delegates for blocks. (#3623) 2018-03-02 14:30:18 +01:00
libtest.linkwith.cs [tests] Since libtest.a need ModelIO now, the corresponding LinkWith attributes need to state that too. 2017-09-01 11:14:46 +02:00