AcDbVoidPtrArray question

AcDbVoidPtrArray question

Anonymous
Not applicable
619 Views
4 Replies
Message 1 of 5

AcDbVoidPtrArray question

Anonymous
Not applicable
If I need to remove everything from an AcDbVoidPtrArray do I have to delete each entity or can I use the setLogicalLength(0) function to clear the array? Does setLogicalLength(0) remove only the pointer to the entitiy or does it remove the entities themselves? Thanks, Eric
0 Likes
620 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
setLogicalLength simply resets the item counter in the array to 0 so that the array thinks it has nothing in it. setPhysical length does this and it frees up the memory used by the array itself (i.e. in this case the memory used to hold the void*s). Neither one will actually free up whatever the void*s point to. "Eric" wrote in message news:41bf0db2$1_2@newsprd01... > If I need to remove everything from an AcDbVoidPtrArray do I have to > delete > each entity or can I use the setLogicalLength(0) function to clear the > array? Does setLogicalLength(0) remove only the pointer to the entitiy or > does it remove the entities themselves? > > Thanks, > Eric > > >
0 Likes
Message 3 of 5

Anonymous
Not applicable
> Neither one will actually free up whatever the > void*s point to. When it will be needed to free up the memory the void*s point to? "Art Cooney" wrote in message news:41bf1813$1_2@newsprd01... > setLogicalLength simply resets the item counter in the array to 0 so that > the array thinks it has nothing in it. setPhysical length does this and it > frees up the memory used by the array itself (i.e. in this case the memory > used to hold the void*s). Neither one will actually free up whatever the > void*s point to. > > "Eric" wrote in message > news:41bf0db2$1_2@newsprd01... > > If I need to remove everything from an AcDbVoidPtrArray do I have to > > delete > > each entity or can I use the setLogicalLength(0) function to clear the > > array? Does setLogicalLength(0) remove only the pointer to the entitiy or > > does it remove the entities themselves? > > > > Thanks, > > Eric > > > > > > > >
0 Likes
Message 4 of 5

Anonymous
Not applicable
Only you can decide that since only you know what the void*s point to and when they are no longer needed. "objectarx" wrote in message news:41bf1ea8$1_2@newsprd01... >> Neither one will actually free up whatever the >> void*s point to. > > When it will be needed to free up the memory the void*s point to? > > > "Art Cooney" wrote in message > news:41bf1813$1_2@newsprd01... >> setLogicalLength simply resets the item counter in the array to 0 so that >> the array thinks it has nothing in it. setPhysical length does this and > it >> frees up the memory used by the array itself (i.e. in this case the >> memory >> used to hold the void*s). Neither one will actually free up whatever the >> void*s point to. >> >> "Eric" wrote in message >> news:41bf0db2$1_2@newsprd01... >> > If I need to remove everything from an AcDbVoidPtrArray do I have to >> > delete >> > each entity or can I use the setLogicalLength(0) function to clear the >> > array? Does setLogicalLength(0) remove only the pointer to the entitiy > or >> > does it remove the entities themselves? >> > >> > Thanks, >> > Eric >> > >> > >> > >> >> > >
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thanks for the clarification. Eric "Art Cooney" wrote in message news:41bf1813$1_2@newsprd01... > setLogicalLength simply resets the item counter in the array to 0 so that > the array thinks it has nothing in it. setPhysical length does this and it > frees up the memory used by the array itself (i.e. in this case the memory > used to hold the void*s). Neither one will actually free up whatever the > void*s point to. > > "Eric" wrote in message > news:41bf0db2$1_2@newsprd01... > > If I need to remove everything from an AcDbVoidPtrArray do I have to > > delete > > each entity or can I use the setLogicalLength(0) function to clear the > > array? Does setLogicalLength(0) remove only the pointer to the entitiy or > > does it remove the entities themselves? > > > > Thanks, > > Eric > > > > > > > >
0 Likes