CFRONT problem with memory

jbolksjbolks Member Posts: 17
edited 2000-03-03 in Navision Financials
I use CFRONT to make a connection with Navision from my Visual basic application. It works good. However, everytime I close the connection and create a new connection there is an additional amount of 92K in use. So if we do this 500 times a day... we have a big problem.

Is there an error in the CFRONT-connection?
Has anybody a solution for this?

Regards
Jan
[email protected]

Comments

  • AlexAlex Member Posts: 54
    Hy Jan
    Sorry i cant help you in your question, but you
    have maybe some example or ex. sheet, which describe
    then connetion between VB and Cside for me ?!

    I have only a little bit knowledge in OCX programming !

    Thanks Alex

    mfg Alex
    Best regards
    Alex Schubert

    ERP & Navision

    Dolphin Communication Technologies GmbH
    Otto-Hahnstr. 1 c
    D-69190 Walldorf
  • jbolksjbolks Member Posts: 17
    When you install CFRONT see the CFRONT.xls example in the cfront-directory.

    But are there programmers using CFRONT & Visual Basic ?
  • dbdb Member Posts: 82
    I'm don't meeted problem like yours.
    Try use ReleaseAllObjects then disconected & then coused error.
    But I don't thik that is problem of CF, check your code for mem allocation errors, because CF using the same buffer for the same conection (if you don't change server).
  • jbolksjbolks Member Posts: 17
    I just created a small test program with only:

    class Connection

    public sub connect()
    Dim myNav as CFRONT
    set myNav = new CFRONT
    myNav.releaseAllObjects
    myNav.openDatabase(db,0, false)
    myNav.closeDatabase()
    set myNav = Nothing
    end sub

    Creating/connect/deleting this class cost everytime 68K memory.

    connectServer/disconnectserver cost 76K memory
    stopOnAllExceptions = False cost 8K memory
    OpenCompany/CloseCompany cost 8k memory
    (see for this in the Windows NT Task manager
    By the way I've test it with CFRONT 2.01 and 2.0.0
  • dbdb Member Posts: 82
    I don't know vb but:
    class Connection

    public sub connect()
    Dim myNav as CFRONT
    set myNav = new CFRONT
    myNav.releaseAllObjects
    myNav.openDatabase(db,0, false)
    myNav.closeDatabase()

    set myNav = Nothing
    //did it release myNav ? in C it must be like
    free myNav;

    end sub
  • jbolksjbolks Member Posts: 17
    Yes... 'set myNav = Nothing' releases myNav (is same as C-statement 'Free myNav')
  • dbdb Member Posts: 82
    Hmmm, looks like destructor not works.
    Try use GetObject or func. that not allocate mem & returs pointer 2 obj.
Sign In or Register to comment.