DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 1 of 4 123 ... LastLast
Results 1 to 15 of 49

Thread: Hardcore String Mid$'ing

Hybrid View

  1. #1
    Chris Lucas Guest

    Hardcore String Mid$'ing


    Greetings all. I'm looking into alternative methods of grabbing the Mid$()
    of a string. Specifically I want to use CopyMemory to modify the pointers
    of elements of a string array so that they each point to different portions
    of the same string, then use CopyMemory to make each element a certain length.
    I can shift the string pointers easily enough, and specify the appropriate
    length, but the results come back garbled. I'm thinking that this has to
    do with the way string arrays are stored in memory. Below is the string
    I'm working with, and the output I get, any help here is appreciated. BTW
    I'm really using PeekLng/PokeLng for those of you familiar with those specialized
    declarations of "RLTMoveMemory".

    My string to tokenize is: "First Second Third"
    After 6 calls to CopyMemory my string elements are:
    element(0) = "Fi "
    element(1) = "Se "
    element(2) = "Th "

    What gives, they point to the right place (obviously) and read the right
    length, but those other bytes aren't where they are supposed to be. Thanks.

    Chris

  2. #2
    Rob Teixeira Guest

    Re: Hardcore String Mid$'ing



    I hate to break the bad news to you, but this is definitely not recommended.
    The first big barrier is that strings aren't immutable.
    The next issue you have to deal with is that a BSTR is a pointer to pointer
    to an array of wide (16-bit unicode) characters. The two bytes preceding
    the pointer are the number of characters. However, in order to be a valid
    string, it *also* needs to be null terminated. You won't be able to accomplish
    that part. A BSTR (or more appropriately, an OLECHAR) only guarantees what
    the data is supposed to look like, not how an operation works with the string,
    and certain operations will look for the null terminator.

    -Rob

    "Chris Lucas" <cdl1051@earthlink.net> wrote:
    >
    >Greetings all. I'm looking into alternative methods of grabbing the Mid$()
    >of a string. Specifically I want to use CopyMemory to modify the pointers
    >of elements of a string array so that they each point to different portions
    >of the same string, then use CopyMemory to make each element a certain length.
    > I can shift the string pointers easily enough, and specify the appropriate
    >length, but the results come back garbled. I'm thinking that this has to
    >do with the way string arrays are stored in memory. Below is the string
    >I'm working with, and the output I get, any help here is appreciated. BTW
    >I'm really using PeekLng/PokeLng for those of you familiar with those specialized
    >declarations of "RLTMoveMemory".
    >
    >My string to tokenize is: "First Second Third"
    >After 6 calls to CopyMemory my string elements are:
    > element(0) = "Fi "
    > element(1) = "Se "
    > element(2) = "Th "
    >
    >What gives, they point to the right place (obviously) and read the right
    >length, but those other bytes aren't where they are supposed to be. Thanks.
    >
    >Chris



  3. #3
    Karl E. Peterson Guest

    Re: Hardcore String Mid$'ing

    Hi Rob --

    > it *also* needs to be null terminated. You won't be able to accomplish


    Curious statement. Why?

    Later... Karl
    --
    [Microsoft Basic: 1976-2001, RIP]



    "Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
    news:3c14f149$1@147.208.176.211...
    >
    >
    > I hate to break the bad news to you, but this is definitely not recommended.
    > The first big barrier is that strings aren't immutable.
    > The next issue you have to deal with is that a BSTR is a pointer to pointer
    > to an array of wide (16-bit unicode) characters. The two bytes preceding
    > the pointer are the number of characters. However, in order to be a valid
    > string, it *also* needs to be null terminated. You won't be able to accomplish
    > that part. A BSTR (or more appropriately, an OLECHAR) only guarantees what
    > the data is supposed to look like, not how an operation works with the string,
    > and certain operations will look for the null terminator.
    >
    > -Rob
    >
    > "Chris Lucas" <cdl1051@earthlink.net> wrote:
    > >
    > >Greetings all. I'm looking into alternative methods of grabbing the Mid$()
    > >of a string. Specifically I want to use CopyMemory to modify the pointers
    > >of elements of a string array so that they each point to different portions
    > >of the same string, then use CopyMemory to make each element a certain length.
    > > I can shift the string pointers easily enough, and specify the appropriate
    > >length, but the results come back garbled. I'm thinking that this has to
    > >do with the way string arrays are stored in memory. Below is the string
    > >I'm working with, and the output I get, any help here is appreciated. BTW
    > >I'm really using PeekLng/PokeLng for those of you familiar with those specialized
    > >declarations of "RLTMoveMemory".
    > >
    > >My string to tokenize is: "First Second Third"
    > >After 6 calls to CopyMemory my string elements are:
    > > element(0) = "Fi "
    > > element(1) = "Se "
    > > element(2) = "Th "
    > >
    > >What gives, they point to the right place (obviously) and read the right
    > >length, but those other bytes aren't where they are supposed to be. Thanks.
    > >
    > >Chris

    >



  4. #4
    Michael \(michka\) Kaplan Guest

    Re: Hardcore String Mid$'ing

    Why does it need to be? Or why can he not accomplish it?


    --
    MichKa

    Michael Kaplan
    (principal developer of the MSLU)
    Trigeminal Software, Inc. -- http://www.trigeminal.com/
    the book -- http://www.i18nWithVB.com/

    "Karl E. Peterson" <karl@mvps.org> wrote in message
    news:3c153bb8@147.208.176.211...
    > Hi Rob --
    >
    > > it *also* needs to be null terminated. You won't be able to accomplish

    >
    > Curious statement. Why?
    >
    > Later... Karl
    > --
    > [Microsoft Basic: 1976-2001, RIP]
    >
    >
    >
    > "Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
    > news:3c14f149$1@147.208.176.211...
    > >
    > >
    > > I hate to break the bad news to you, but this is definitely not

    recommended.
    > > The first big barrier is that strings aren't immutable.
    > > The next issue you have to deal with is that a BSTR is a pointer to

    pointer
    > > to an array of wide (16-bit unicode) characters. The two bytes preceding
    > > the pointer are the number of characters. However, in order to be a

    valid
    > > string, it *also* needs to be null terminated. You won't be able to

    accomplish
    > > that part. A BSTR (or more appropriately, an OLECHAR) only guarantees

    what
    > > the data is supposed to look like, not how an operation works with the

    string,
    > > and certain operations will look for the null terminator.
    > >
    > > -Rob
    > >
    > > "Chris Lucas" <cdl1051@earthlink.net> wrote:
    > > >
    > > >Greetings all. I'm looking into alternative methods of grabbing the

    Mid$()
    > > >of a string. Specifically I want to use CopyMemory to modify the

    pointers
    > > >of elements of a string array so that they each point to different

    portions
    > > >of the same string, then use CopyMemory to make each element a certain

    length.
    > > > I can shift the string pointers easily enough, and specify the

    appropriate
    > > >length, but the results come back garbled. I'm thinking that this has

    to
    > > >do with the way string arrays are stored in memory. Below is the

    string
    > > >I'm working with, and the output I get, any help here is appreciated.

    BTW
    > > >I'm really using PeekLng/PokeLng for those of you familiar with those

    specialized
    > > >declarations of "RLTMoveMemory".
    > > >
    > > >My string to tokenize is: "First Second Third"
    > > >After 6 calls to CopyMemory my string elements are:
    > > > element(0) = "Fi "
    > > > element(1) = "Se "
    > > > element(2) = "Th "
    > > >
    > > >What gives, they point to the right place (obviously) and read the

    right
    > > >length, but those other bytes aren't where they are supposed to be.

    Thanks.
    > > >
    > > >Chris

    > >

    >




  5. #5
    Karl E. Peterson Guest

    Re: Hardcore String Mid$'ing

    Yeah, the latter.

    I went back and reread the original question, and I'm not fully sure I understand
    anyway, so perhaps my question is out of place? I guess if the OP is enlarging the
    string elements, yeah, that'd be a problem. But if their contents is simply being
    replaced...?
    --
    [Microsoft Basic: 1976-2001, RIP]


    "Michael (michka) Kaplan" <former_mvp@nospam.trigeminal.spamless.com> wrote in
    message news:3c153c2f$1@147.208.176.211...
    > Why does it need to be? Or why can he not accomplish it?
    >
    >
    > --
    > MichKa
    >
    > Michael Kaplan
    > (principal developer of the MSLU)
    > Trigeminal Software, Inc. -- http://www.trigeminal.com/
    > the book -- http://www.i18nWithVB.com/
    >
    > "Karl E. Peterson" <karl@mvps.org> wrote in message
    > news:3c153bb8@147.208.176.211...
    > > Hi Rob --
    > >
    > > > it *also* needs to be null terminated. You won't be able to accomplish

    > >
    > > Curious statement. Why?
    > >
    > > Later... Karl
    > > --
    > > [Microsoft Basic: 1976-2001, RIP]
    > >
    > >
    > >
    > > "Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
    > > news:3c14f149$1@147.208.176.211...
    > > >
    > > >
    > > > I hate to break the bad news to you, but this is definitely not

    > recommended.
    > > > The first big barrier is that strings aren't immutable.
    > > > The next issue you have to deal with is that a BSTR is a pointer to

    > pointer
    > > > to an array of wide (16-bit unicode) characters. The two bytes preceding
    > > > the pointer are the number of characters. However, in order to be a

    > valid
    > > > string, it *also* needs to be null terminated. You won't be able to

    > accomplish
    > > > that part. A BSTR (or more appropriately, an OLECHAR) only guarantees

    > what
    > > > the data is supposed to look like, not how an operation works with the

    > string,
    > > > and certain operations will look for the null terminator.
    > > >
    > > > -Rob
    > > >
    > > > "Chris Lucas" <cdl1051@earthlink.net> wrote:
    > > > >
    > > > >Greetings all. I'm looking into alternative methods of grabbing the

    > Mid$()
    > > > >of a string. Specifically I want to use CopyMemory to modify the

    > pointers
    > > > >of elements of a string array so that they each point to different

    > portions
    > > > >of the same string, then use CopyMemory to make each element a certain

    > length.
    > > > > I can shift the string pointers easily enough, and specify the

    > appropriate
    > > > >length, but the results come back garbled. I'm thinking that this has

    > to
    > > > >do with the way string arrays are stored in memory. Below is the

    > string
    > > > >I'm working with, and the output I get, any help here is appreciated.

    > BTW
    > > > >I'm really using PeekLng/PokeLng for those of you familiar with those

    > specialized
    > > > >declarations of "RLTMoveMemory".
    > > > >
    > > > >My string to tokenize is: "First Second Third"
    > > > >After 6 calls to CopyMemory my string elements are:
    > > > > element(0) = "Fi "
    > > > > element(1) = "Se "
    > > > > element(2) = "Th "
    > > > >
    > > > >What gives, they point to the right place (obviously) and read the

    > right
    > > > >length, but those other bytes aren't where they are supposed to be.

    > Thanks.
    > > > >
    > > > >Chris
    > > >

    > >

    >
    >



  6. #6
    Chris Lucas Guest

    Re: Hardcore String Mid$'ing


    Karl and Co.,

    What I'm trying to accomplish here is to pretty much fake a string array.
    By using SysAllocStringByteLen I generate elements of my string array (who
    knows or cares what they contain!). Then hack their pointers and the byte
    that holds their length, so that they all point to unique chunks of one long
    string. By doing this, I am tokenizing the long string and moving these
    tokens into my string array. Of course, all this is fake, and if the long
    string changes, so do my elements, but thats ok. I'm sure this seems like
    a lot of trouble when I could just call Mid$() but with long tokens I'm betting
    this is much much faster than actually shifting copies of the data around.
    That said, my problem remains. I can make each pointer point at the
    correct starting location in the long string, and I can force each element
    to be the correct length, but things don't quite work out. Lemme break down
    what I'm doing, then maybe someone can tell me why its not working...

    1. I use PokeLng (CopyMem) to alter str(0)'s string pointer, now it points
    at the begining of strTarget lets call it.

    2. I use PokeLng again, this time I poke a value of 10 to the address StrPtr(str(0))
    - 4. This is where the length is stored.

    3. I read the contents of str(0). Rather than containing "First" as expected
    if contains "Fi ".

    So what the heck? Aren't the characters "rst" stored right after "Fi" in
    memory? I was under the impression that strings were stored continously
    in memory. Or does the problem lie with the string array's element? Hope
    someone out there has some voodoo for me, I've said a mouthful.

    Chris

  7. #7
    Michael \(michka\) Kaplan Guest

    Re: Hardcore String Mid$'ing

    This is a REALLY really REALLY really bad idea.

    These strings are allocated (as are all BSTRs) and your mucking is going to
    cause memory to leak. You are really gaining nothing here but problems.


    --
    MichKa

    Michael Kaplan
    (principal developer of the MSLU)
    Trigeminal Software, Inc. -- http://www.trigeminal.com/
    the book -- http://www.i18nWithVB.com/

    "Chris Lucas" <cdl1051@earthlink.net> wrote in message
    news:3c154edb$1@147.208.176.211...
    >
    > Karl and Co.,
    >
    > What I'm trying to accomplish here is to pretty much fake a string

    array.
    > By using SysAllocStringByteLen I generate elements of my string array

    (who
    > knows or cares what they contain!). Then hack their pointers and the byte
    > that holds their length, so that they all point to unique chunks of one

    long
    > string. By doing this, I am tokenizing the long string and moving these
    > tokens into my string array. Of course, all this is fake, and if the long
    > string changes, so do my elements, but thats ok. I'm sure this seems like
    > a lot of trouble when I could just call Mid$() but with long tokens I'm

    betting
    > this is much much faster than actually shifting copies of the data around.
    > That said, my problem remains. I can make each pointer point at the
    > correct starting location in the long string, and I can force each element
    > to be the correct length, but things don't quite work out. Lemme break

    down
    > what I'm doing, then maybe someone can tell me why its not working...
    >
    > 1. I use PokeLng (CopyMem) to alter str(0)'s string pointer, now it points
    > at the begining of strTarget lets call it.
    >
    > 2. I use PokeLng again, this time I poke a value of 10 to the address

    StrPtr(str(0))
    > - 4. This is where the length is stored.
    >
    > 3. I read the contents of str(0). Rather than containing "First" as

    expected
    > if contains "Fi ".
    >
    > So what the heck? Aren't the characters "rst" stored right after "Fi" in
    > memory? I was under the impression that strings were stored continously
    > in memory. Or does the problem lie with the string array's element? Hope
    > someone out there has some voodoo for me, I've said a mouthful.
    >
    > Chris




  8. #8
    Chris Lucas Guest

    Re: Hardcore String Mid$'ing


    I understand the concerns, and everyone else seems to agree with you,
    but I'd still like to know if this can be done and if so how. My guess is
    it can be made to work, then if there's no performance gain, its moot so
    no biggie.

    Chris

    "Michael \(michka\) Kaplan" <former_mvp@nospam.trigeminal.spamless.com> wrote:
    >This is a REALLY really REALLY really bad idea.
    >
    >These strings are allocated (as are all BSTRs) and your mucking is going

    to
    >cause memory to leak. You are really gaining nothing here but problems.
    >
    >
    >--
    >MichKa
    >
    >Michael Kaplan
    >(principal developer of the MSLU)
    >Trigeminal Software, Inc. -- http://www.trigeminal.com/
    >the book -- http://www.i18nWithVB.com/
    >
    >"Chris Lucas" <cdl1051@earthlink.net> wrote in message
    >news:3c154edb$1@147.208.176.211...
    >>
    >> Karl and Co.,
    >>
    >> What I'm trying to accomplish here is to pretty much fake a string

    >array.
    >> By using SysAllocStringByteLen I generate elements of my string array

    >(who
    >> knows or cares what they contain!). Then hack their pointers and the

    byte
    >> that holds their length, so that they all point to unique chunks of one

    >long
    >> string. By doing this, I am tokenizing the long string and moving these
    >> tokens into my string array. Of course, all this is fake, and if the

    long
    >> string changes, so do my elements, but thats ok. I'm sure this seems

    like
    >> a lot of trouble when I could just call Mid$() but with long tokens I'm

    >betting
    >> this is much much faster than actually shifting copies of the data around.
    >> That said, my problem remains. I can make each pointer point at the
    >> correct starting location in the long string, and I can force each element
    >> to be the correct length, but things don't quite work out. Lemme break

    >down
    >> what I'm doing, then maybe someone can tell me why its not working...
    >>
    >> 1. I use PokeLng (CopyMem) to alter str(0)'s string pointer, now it points
    >> at the begining of strTarget lets call it.
    >>
    >> 2. I use PokeLng again, this time I poke a value of 10 to the address

    >StrPtr(str(0))
    >> - 4. This is where the length is stored.
    >>
    >> 3. I read the contents of str(0). Rather than containing "First" as

    >expected
    >> if contains "Fi ".
    >>
    >> So what the heck? Aren't the characters "rst" stored right after "Fi"

    in
    >> memory? I was under the impression that strings were stored continously
    >> in memory. Or does the problem lie with the string array's element?

    Hope
    >> someone out there has some voodoo for me, I've said a mouthful.
    >>
    >> Chris

    >
    >



  9. #9
    Anthony Jones Guest

    Re: Hardcore String Mid$'ing

    Chris,

    Aren't you corrupting your string by poking a length value in the middle of
    a larger string?

    How do you ensure that the large string gets released properly?

    >>

    Aren't the characters "rst" stored right after "Fi" in memory? I was under
    the impression that strings were stored continously in memory.
    <<

    Yes. It's worrying that you asked.

    However, from what you have described so far I can't see a reason for your
    strange results. Perhaps if you share your definition of PokeLng and how
    your use it or better yet some example code.

    --
    Anthony Jones
    Nuesoft Ltd




  10. #10
    Chris Lucas Guest

    Re: Hardcore String Mid$'ing


    >Aren't you corrupting your string by poking a length value in the middle

    of
    >a larger string?


    The addresses in memory that I'm poking values into should (and do) coincide
    with the BSTRs for my string array, they are not inside my longer string.
    Of course you were only getting all this second-hand so that's my fault.
    Below is the code and the contents of the immediate window. You can see
    that the string is fine and there is no memory leak as everything will go
    out of scope at the same time. This is rapidly becoming personal, I'd really
    like to get this to work. Thanks for the help.

    Chris

    ' Toss this into a module
    Option Explicit

    Public Declare Sub PeekLng Lib "kernel32" Alias "RtlMoveMemory" ( _
    Dst As Long, _
    ByVal Addr As Long, _
    Optional ByVal nBytes As Long = 4)
    Public Declare Sub PokeLng Lib "kernel32" Alias "RtlMoveMemory" ( _
    ByVal Addr As Long, _
    Value As Long, _
    Optional ByVal nBytes As Long = 4)

    Sub Main()

    Dim asFoo() As String
    Dim strTokens As String
    Dim i As Long
    Dim tmp As Long

    ReDim asFoo(2)

    strTokens = "First Second Third"

    asFoo(0) = Space$(5)
    asFoo(1) = Space$(6)
    asFoo(2) = Space$(5)


    ' Make asFoo(0) point at "F" in strTokens
    tmp = StrPtr(strTokens)
    PokeLng StrPtr(asFoo(0)), ByVal tmp

    ' Make asFoo(0) 5 characters long
    PokeLng StrPtr(asFoo(0)) - 4, 10

    ' Make asFoo(1) point at "S" in strTokens
    tmp = tmp + 12
    PokeLng StrPtr(asFoo(1)), ByVal tmp

    ' Make asFoo(1) 6 characters long
    PokeLng StrPtr(asFoo(1)) - 4, 12

    ' Make asFoo(2) point at "T" in strTokens
    tmp = tmp + 14
    PokeLng StrPtr(asFoo(2)), ByVal tmp

    ' Make asFoo(2) 5 characters long
    PokeLng StrPtr(asFoo(2)) - 4, 10

    ' Lets inspect our handy-work
    For i = 0 To 2
    Debug.Print asFoo(i) & "[End]"
    PeekLng tmp, StrPtr(asFoo(i)) - 4
    Debug.Print tmp
    Next i

    ' Now lets make sure the original string didn't get corrupted
    Debug.Print strTokens
    End Sub


    ' Contents of the immediate window
    Fi [End]
    10
    Se [End]
    12
    Th [End]
    10
    First Second Third

  11. #11
    Paul Marshall Guest

    Re: Hardcore String Mid$'ing

    On 11 Dec 2001 11:49:58 GMT, "Chris Lucas"
    <cdl1051@earthlink.net> wrote:

    Public Declare Sub PokeLng Lib "kernel32" Alias "RtlMoveMemory" ( _
    ByVal Addr As Long, _
    Value As Long, _
    Optional ByVal nBytes As Long = 4)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    There's your problem.


    --
    Paul Marshall
    pmarshal@vulcraft-al.com

  12. #12
    Chris Lucas Guest

    Re: Hardcore String Mid$'ing


    Paul Marshall <pmarshal@vulcraft-al.com> wrote:
    >On 11 Dec 2001 11:49:58 GMT, "Chris Lucas"
    ><cdl1051@earthlink.net> wrote:
    >
    > Public Declare Sub PokeLng Lib "kernel32" Alias "RtlMoveMemory" ( _
    > ByVal Addr As Long, _
    > Value As Long, _
    > Optional ByVal nBytes As Long = 4)
    > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    >
    >There's your problem.


    Excellent, thank you for seeing what I kept missing. This was in fact the
    problem. Thanks again to everyone, and especially Paul.

    Chris

  13. #13
    Michael \(michka\) Kaplan Guest

    Re: Hardcore String Mid$'ing

    DON'T DO IT.

    You are still leaking memory. This is bad. Please reconsider this
    stupidty -- anyone smart enough to do this should be smart enough to know
    *not* to do it!!!


    --
    MichKa

    Michael Kaplan
    (principal developer of the MSLU)
    Trigeminal Software, Inc. -- http://www.trigeminal.com/
    the book -- http://www.i18nWithVB.com/

    "Chris Lucas" <cdl1051@earthlink.net> wrote in message
    news:3c1605c3$1@147.208.176.211...
    >
    > Paul Marshall <pmarshal@vulcraft-al.com> wrote:
    > >On 11 Dec 2001 11:49:58 GMT, "Chris Lucas"
    > ><cdl1051@earthlink.net> wrote:
    > >
    > > Public Declare Sub PokeLng Lib "kernel32" Alias "RtlMoveMemory" ( _
    > > ByVal Addr As Long, _
    > > Value As Long, _
    > > Optional ByVal nBytes As Long = 4)
    > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    > >
    > >There's your problem.

    >
    > Excellent, thank you for seeing what I kept missing. This was in fact the
    > problem. Thanks again to everyone, and especially Paul.
    >
    > Chris




  14. #14
    Rob Teixeira Guest

    Re: Hardcore String Mid$'ing


    "Karl E. Peterson" <karl@mvps.org> wrote:
    >Yeah, the latter.
    >
    >I went back and reread the original question, and I'm not fully sure I understand
    >anyway, so perhaps my question is out of place? I guess if the OP is enlarging

    the
    >string elements, yeah, that'd be a problem. But if their contents is simply

    being
    >replaced...?


    From what i understand, he has a string like:

    "This is a string"

    Then, he is making an array of strings (which we know is really an array
    of pointers), so that (for example) each element is one word in the original
    string. Rather than create new string elements, he wants to simply point
    to a character within the original string. *BAD IDEA*

    The contents of a BSTR Looks like the following:

    [ptr] ----+
    |
    v
    [length] 'T' '' 'h' '' 'i' '' 's' '' [null terminator]

    You can't insert the length or the null terminator into the original string,
    into the middle of the other characters. Without this, some string operations
    will not work correctly.

    Furthermore, not only can you leak memory (as Michael points out), when VB
    automatically calls SysFreeString(), you will most likely corrupt memory.
    In addition, some other string functions also have the potential to corrupt
    memory in a similar fashion.

    Any performance gains would not be worth the potential problems - and wouldn't
    be that big to begin with. I'm not saying this isn't a clever attempt, it's
    just not worth it

    -Rob

  15. #15
    Chris Lucas Guest

    Re: Hardcore String Mid$'ing


    "Michael \(michka\) Kaplan" <former_mvp@nospam.trigeminal.spamless.com> wrote:
    >DON'T DO IT.
    >
    >You are still leaking memory. This is bad. Please reconsider this
    >stupidty -- anyone smart enough to do this should be smart enough to know
    >*not* to do it!!!


    Michael,

    As I understand it a memory leak is a chunk of memory that continues
    to be thought of as used by windows even though it is not. So your saying
    when the string and the array go out of scope, because they are both pointing
    to the same spot in memory, this portion will not become free?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center