Mercurial > projects > ddmd
comparison dmd/String.d @ 178:e3afd1303184
Many small bugs fixed
Made all classes derive from TObject to detect memory leaks (functionality is disabled for now)
Began work on overriding backend memory allocations (to avoid memory leaks)
author | korDen |
---|---|
date | Sun, 17 Oct 2010 07:42:00 +0400 |
parents | e28b18c23469 |
children |
comparison
equal
deleted
inserted
replaced
177:1475fd394c9e | 178:e3afd1303184 |
---|---|
6 import core.stdc.string : strlen; | 6 import core.stdc.string : strlen; |
7 import std.string : cmp; | 7 import std.string : cmp; |
8 | 8 |
9 import std.stdio : writefln; | 9 import std.stdio : writefln; |
10 | 10 |
11 class String | 11 import dmd.TObject; |
12 | |
13 class String : TObject | |
12 { | 14 { |
13 string str; | 15 string str; |
14 | 16 |
15 this(string str) | 17 this(string str) |
16 { | 18 { |
19 register(); | |
17 this.str = str; | 20 this.str = str; |
18 } | 21 } |
19 | 22 |
20 static hash_t calcHash(const(char)* str, size_t len) | 23 static hash_t calcHash(const(char)* str, size_t len) |
21 { | 24 { |