Author Topic: saving data structures in the state file  (Read 4806 times)

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
saving data structures in the state file
« on: September 20, 2017, 09:32:25 AM »
Despite writing slick macros for several years I'm not sure I fully grasped the fact that slick saves all of your "variable data" in the state file.  I have a hash array as below indexed by buffer name and for each buffer there is a linked list.  It's a history of where the current line has been.  This could amount to a fair amount of memory over time, not sure how much.  It turns out that it's useful to have slick keep this information, possibly saves me reading and writing to disk - though there's no check for corruption. 

Is it a bad idea to leave this information in the state file?  Should I try to delete it on shutdown?

static dlist    buffer_retrace_cursor_list:[];

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: saving data structures in the state file
« Reply #1 on: September 24, 2017, 03:52:34 PM »
it’s probably fine to leave this in the state file. When it gets too large you could have your code reduce the size.