diff options
author | Jb Evain <jbevain@gmail.com> | 2011-10-27 16:53:07 +0400 |
---|---|---|
committer | Jb Evain <jbevain@gmail.com> | 2011-10-27 16:53:07 +0400 |
commit | 8771de6415d3fa5e34b12fd90519a5405c02e8b2 (patch) | |
tree | 0a1707ab3fc77c49d3f5f6f51628089ccffb1d19 /Mono.Cecil.Metadata/UserStringHeap.cs | |
parent | ecdd7454b53a4d6b57c9eb2a500b91025a63b401 (diff) |
First pass at a branch with reduced memory usage; Keeps an open handle on the file, dispose your modules
Diffstat (limited to 'Mono.Cecil.Metadata/UserStringHeap.cs')
-rw-r--r-- | Mono.Cecil.Metadata/UserStringHeap.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Mono.Cecil.Metadata/UserStringHeap.cs b/Mono.Cecil.Metadata/UserStringHeap.cs index 5910508..7046eff 100644 --- a/Mono.Cecil.Metadata/UserStringHeap.cs +++ b/Mono.Cecil.Metadata/UserStringHeap.cs @@ -26,23 +26,18 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; - -using Mono.Cecil.PE; - namespace Mono.Cecil.Metadata { sealed class UserStringHeap : StringHeap { - public UserStringHeap (Section section, uint start, uint size) - : base (section, start, size) + public UserStringHeap (byte [] data) + : base (data) { } protected override string ReadStringAt (uint index) { - byte [] data = Section.Data; - int start = (int) (index + Offset); + int start = (int) index; uint length = (uint) (data.ReadCompressedUInt32 (ref start) & ~1); if (length < 1) |