Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Memory leak In Excel range pointer

Memory leak In Excel range pointer

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    trioum
    wrote on last edited by
    #1

    _Worksheet objSheet; Range objRange; -----------some code here---------------- objRange = objSheet.GetRange(COleVariant(A1),COleVariant(K4)); //at the following line I got the memory leak memory of my programme get increase ret = objRange.GetValue2(); How to solve that problem

    Trioum

    S 1 Reply Last reply
    0
    • T trioum

      _Worksheet objSheet; Range objRange; -----------some code here---------------- objRange = objSheet.GetRange(COleVariant(A1),COleVariant(K4)); //at the following line I got the memory leak memory of my programme get increase ret = objRange.GetValue2(); How to solve that problem

      Trioum

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      How do you know there is a leak? What are the types of the variables?

      Steve

      T 1 Reply Last reply
      0
      • S Stephen Hewitt

        How do you know there is a leak? What are the types of the variables?

        Steve

        T Offline
        T Offline
        trioum
        wrote on last edited by
        #3

        _Worksheet objSheet; Range objRange; -----------some code here---------------- // code to obtained the excel sheet pointer objRange = objSheet.GetRange(COleVariant(A1),COleVariant(K4)); //at the following line I got the memory leak memory of my programme get increase ret = objRange.GetValue2(); As I call the ret = objRange.GetValue2(); memory occupied by exe getting increased. I see in task manager -> process . I have a timer of 1 second which poll data every secong form the excel file . if I do not start timer then there is no memory increase in excel file .

        Trioum

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups