Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2014, 10:57 AM
whatsup whatsup is offline Slow "comparison/replace" script Windows 7 64bit Slow "comparison/replace" script Office 2010 32bit
Competent Performer
 
Join Date: May 2014
Posts: 137
whatsup will become famous soon enough
Default

Hi CoolBlue

Sorry, it took me longer as I told in the PM.
Now, that seems to become a fulltime job - I'm not sure if I can summon up that time.

I studied your pic now for quite a while and wonder how serious you're about the reference of
rawSheets(1).Range("A1") and
rawSheet1.Range("A1")
Be aware that though basically it's the same object, the references or pointers may differ. Sheets(1) is an object of a spreadsheet relative to its position in the workbook whereas Sheet1 is a - you may say - static object within a workbook.
I don't know if it is the right thing to put it, but to explain it more visually:
For Sheets(1): Is assigned a pointer, which itself points to the object Sheet1. To say there are 2 pointers necessary.
Sheet1 instead, as it is the end of the line of objects, only needs 1 pointer.
So don't get confused, if the two cases show different pointers.


Quote:
I made a tool to parse the memory structure of these objects and I can show a map of what is going on in your Mod02_objRange module...
What you mean with this? You can't probably monitor the entire memory, can you?

I think the key would be to know about the structure of an object. Unfortunately the CombSite stops before he comes to this. On purpose? I can imagine, that the structure is quite difficult. Probably even containing references to various pointers, which all together only forming an object?

Quote:
Although its useful for investigating the memory structure, the range object is not a useful example for checking garbage collection since no object structures are created... there are only references to global Range Objects which are not part of VBA's garbage collection
I basically agree on this one. The objects exist in memory and those don't get destroyed as long the objects themselves are alive, all what matters: Do the references to these objects get destroyed, and that of course is the job the garbage collector has to perform. Now, in case you're right that the stack gets moved around all the time, it will be difficult if not impossible to keep track of these movements. But I hardly can imagine that this is the case. It would mean unnecessary efforts for systems to keep track of these movements for itself.
I rather imagine memory like a town, there are districts (which get assigned to a program as excel), within the district there are streets containing numbers (pointers) which hold the references. An inhabitant (value/object/whatsoever) either lives their (during runtime) or get moved out (by the garbage collector, or by setting it to nothing in case of objects)



That would lead us back to us establishing: A pointer (varPtr) contaning any other information as during runtime, allows the conclusion that references got destroyed and memory is freed.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wierd "script code" in a downloaded .doc file CNBarnes Word 2 10-18-2012 02:07 AM
Slow "comparison/replace" script replace data from variable with "sub and super script" from excel to word by vba krishnaoptif Word VBA 9 06-22-2012 05:08 AM
Slow "comparison/replace" script How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
Rules and Alerts: "run a script"? discountvc Outlook 0 06-15-2010 07:36 AM
An "error has occurred in the script on this page" decann Outlook 8 09-03-2009 08:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft