private static void Using(Action <ILinks <TLink> > action)
 {
     using (var dataMemory = new HeapResizableDirectMemory())
         using (var indexMemory = new HeapResizableDirectMemory())
             using (var memory = new UInt32SplitMemoryLinks(dataMemory, indexMemory))
             {
                 action(memory);
             }
 }
        private static void UsingWithExternalReferences(Action <ILinks <TLink> > action)
        {
            var contants = new LinksConstants <TLink>(enableExternalReferencesSupport: true);

            using (var dataMemory = new HeapResizableDirectMemory())
                using (var indexMemory = new HeapResizableDirectMemory())
                    using (var memory = new UInt32SplitMemoryLinks(dataMemory, indexMemory, UInt32SplitMemoryLinks.DefaultLinksSizeStep, contants))
                    {
                        action(memory);
                    }
        }