Ignore:
Timestamp:
Jun 3, 2006, 4:37:09 PM (15 years ago)
Author:
Eugene Romanenko
Message:

implemented 'select all', fixes for crash in libc memanager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/plugins/ludoc/cpconv.cpp

    r37 r40  
    3333
    3434
     35#define INCL_DOS
    3536#include <os2.h>
    3637
     
    182183
    183184    sl =  *in_left;
    184     ucs = new UniChar[ sl ];
     185    //ucs = new UniChar[ sl ];
     186    // have crashes in libc memmanager due to frequent alloc/free
     187    // use system malloc routines as workaround
     188    DosAllocMem( (PPVOID)&ucs, sl * sizeof( UniChar ), fALLOC );
    185189    orig_ucs = ucs;
    186190
    187191    rc = UniUconvToUcs( objtoucs, (void **)in, in_left, &ucs, &sl, &retval );
    188192    if ( rc != 0 ) {
    189         delete ucs;
     193        //delete ucs;
     194        DosFreeMem( ucs );
    190195        err = 1;
    191196        return -1;
     
    195200    ucs = orig_ucs;
    196201    rc = UniUconvFromUcs( objfromucs, &ucs, &sl, (void **)out, out_left, &nonid );
    197     delete ucs;
     202    //delete ucs;
     203    DosFreeMem( ucs );
    198204
    199205    if ( rc != 0 ) {
Note: See TracChangeset for help on using the changeset viewer.