@@ -0,0 +1,1542 @@
+package com.tightdb;%0A%0Aimport static org.testng.AssertJUnit.*;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.testng.annotations.Test;%0A%0A%0A// Tables get detached%0A%0Apublic class JNIGarbageCollectorSubtableSchemaTest %7B%0A%0A    private Table t;%0A%0A%0A    public void test1(long count)%7B%0A        t = new Table();%0A%0A        t.addColumn(ColumnType.TABLE, %22table%22);%0A        t.addEmptyRow();%0A%0A        List%3CTableSchema%3E tables = new ArrayList%3CTableSchema%3E();%0A%0A        for (long i=0;i%3Ccount;i++)%7B%0A            t.addEmptyRow();%0A            tables.add(t.getSubTableSchema(0));%0A        %7D%0A        %0A        t.close();%0A    %7D%0A%0A    public void test2(long count)%7B%0A        t = new Table();%0A%0A        t.addColumn(ColumnType.TABLE, %22table%22);%0A        t.addEmptyRow();%0A%0A        for (long i=0;i%3Ccount;i++)%7B%0A            t.addEmptyRow();%0A%0A            TableSchema schema = t.getSubTableSchema(0);%0A            schema.toString();%0A        %7D%0A        %0A        t.close();%0A    %7D%0A%0A    public void test3(long count)%7B%0A        t = new Table();%0A%0A        t.addColumn(ColumnType.TABLE, %22table%22);%0A        t.addEmptyRow();%0A%0A        for (long i=0;i%3Ccount;i++)%7B%0A            t.addEmptyRow();%0A%0A            TableSchema schema = t.getSubTableSchema(0);%0A            schema.toString();%0A            //schema.close();%0A        %7D%0A        %0A        t.close();%0A    %7D%0A%0A%0A    @Test%0A    public void testGetSubtable()%7B%0A%0A        long count = 1000;%0A        long loop = 1000;%0A%0A        for (int i=0;i%3Cloop;i++)%7B%0A            test1(count);%0A            test2(count);%0A            test3(count);%0A        %7D%0A    %7D%0A%7D%0A

test case for TableSchema added