Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Move the native memory allocation wrapper methods into the new SQLiteMemory class. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | virtualTables |
Files: | files | file ages | folders |
SHA1: |
c16bb56cfd403ee3698c53b4f871f9ae |
User & Date: | mistachkin 2013-06-21 05:39:00.085 |
Context
2013-06-21
| ||
06:06 | Modularize various aspects of the virtual table handling in the example SQLiteVirtualTableCursorEnumerable class. check-in: 5033bacee1 user: mistachkin tags: virtualTables | |
05:39 | Move the native memory allocation wrapper methods into the new SQLiteMemory class. check-in: c16bb56cfd user: mistachkin tags: virtualTables | |
05:14 | Fix memory leak in the SQLiteModuleBase class. Add support for optionally tracking memory usage of the SQLiteMarshal class. Make sure sqlite3_*_interop() functions are only used when SQLITE_STANDARD is not defined. check-in: 4aab5f9721 user: mistachkin tags: virtualTables | |
Changes
Changes to SQLite.NET.Settings.targets.
︙ | |||
196 197 198 199 200 201 202 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - + - + - + | These counts are intended to be used by the test suite to detect possible resource leaks. --> <CountHandle Condition="'$(CountHandle)' == ''">false</CountHandle> <!-- NOTE: Enable tracking of all outstanding bytes allocated by the |
︙ |
Changes to Setup/set_user_mistachkin_Debug.bat.
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 | - + | REM NOTE: Enables the extra debug code helpful in troubleshooting issues. REM SET MSBUILD_ARGS=/p:CheckState=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:CountHandle=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceConnection=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceHandle=true SET MSBUILD_ARGS=%MSBUILD_ARGS% /p:TraceStatement=true |
Changes to System.Data.SQLite/SQLite3.cs.
︙ | |||
1605 1606 1607 1608 1609 1610 1611 | 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 | - + | throw new SQLiteException(SQLiteErrorCode.Error, GetLastError()); } } finally { if (pName != IntPtr.Zero) { |
︙ | |||
1688 1689 1690 1691 1692 1693 1694 | 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 | - + | return n; } finally { if (pSql != IntPtr.Zero) { |
︙ |
Changes to System.Data.SQLite/SQLiteDefineConstants.cs.
︙ | |||
108 109 110 111 112 113 114 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - - + + | "TRACE_STATEMENT", #endif #if TRACE_WARNING "TRACE_WARNING", #endif |
︙ |
Changes to System.Data.SQLite/SQLiteModuleBase.cs.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + | /******************************************************** * ADO.NET 2.0 Data Provider for SQLite Version 3.X * Written by Joe Mistachkin (joe@mistachkin.com) * * Released to the public domain, use at your own risk! ********************************************************/ using System.Collections.Generic; using System.Globalization; using System.Runtime.InteropServices; using System.Text; |
︙ | |||
1339 1340 1341 1342 1343 1344 1345 | 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 | - - + + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - + - - - - - - - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + | int savepoint /* in */ ); } #endregion /////////////////////////////////////////////////////////////////////////// |
︙ | |||
1628 1629 1630 1631 1632 1633 1634 | 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 | - + - + | } return length; } /////////////////////////////////////////////////////////////////////// |
︙ | |||
1660 1661 1662 1663 1664 1665 1666 | 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 | - + - + - + - + - + | } return String.Empty; } /////////////////////////////////////////////////////////////////////// |
︙ | |||
1754 1755 1756 1757 1758 1759 1760 | 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 | - + - + | } return result; } /////////////////////////////////////////////////////////////////////// |
︙ | |||
1872 1873 1874 1875 1876 1877 1878 | 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 | - + | index.Outputs.ConstraintUsages[iConstraint] = new SQLiteIndexConstraintUsage(constraintUsage); } } /////////////////////////////////////////////////////////////////////// |
︙ | |||
2055 2056 2057 2058 2059 2060 2061 | 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 | - + | #region Protected Members #region Native Table Helper Methods protected virtual IntPtr AllocateTable() { int size = Marshal.SizeOf(typeof( UnsafeNativeMethods.sqlite3_vtab)); |
︙ | |||
2083 2084 2085 2086 2087 2088 2089 | 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 | - + - + - + | } /////////////////////////////////////////////////////////////////////// protected virtual void FreeTable(IntPtr pVtab) { SetTableError(pVtab, null); |
︙ | |||
2289 2290 2291 2292 2293 2294 2295 | 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 | - + - + | return false; int offset = IntPtr.Size + sizeof(int); IntPtr pError = SQLiteMarshal.ReadIntPtr(pVtab, offset); if (pError != IntPtr.Zero) { |
︙ |
Changes to System.Data.SQLite/System.Data.SQLite.Properties.targets.
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + - - + + | NOTE: Enable counting of the CriticalHandle derived object instances? --> <PropertyGroup Condition="'$(CountHandle)' != 'false'"> <DefineConstants>$(DefineConstants);COUNT_HANDLE</DefineConstants> </PropertyGroup> <!-- |
︙ |
Changes to Tests/common.eagle.
︙ | |||
1474 1475 1476 1477 1478 1479 1480 | 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 | - + - + - + - + - + | } proc reportSQLiteResources { channel {quiet false} {collect true} } { # # NOTE: Skip all output if we are running in "quiet" mode. # if {[haveConstraint \ |
︙ | |||
1951 1952 1953 1954 1955 1956 1957 | 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 | - + | foreach defineConstant [list \ CHECK_STATE COUNT_HANDLE DEBUG INTEROP_CODEC INTEROP_DEBUG \ INTEROP_EXTENSION_FUNCTIONS INTEROP_LEGACY_CLOSE INTEROP_LOG \ INTEROP_TEST_EXTENSION NET_20 NET_35 NET_40 NET_45 NET_COMPACT_20 \ PLATFORM_COMPACTFRAMEWORK PRELOAD_NATIVE_LIBRARY RETARGETABLE \ SQLITE_STANDARD THROW_ON_DISPOSED TRACE TRACE_CONNECTION \ TRACE_HANDLE TRACE_PRELOAD TRACE_STATEMENT TRACE_WARNING \ |
︙ |