<div dir="auto"><div>I wouldn't say that: in this particular case all the scalars are drawn in abstractions with gop (or even without gop). The same happens in the help files of the abstractions in my jmmmp library.</div><div dir="auto">The $0 might not be the problem as well, as there aren't that many loose scalars starting with 10.. as there should be.</div><div dir="auto"><br></div><div dir="auto">I think as well, changing the struct definition isn't the problem: I didn't change the patch that often, and after deleting the data from the file, it appears again next time the patch is saved. It might be the case that the main patch creates a kind of copy of the struct definitions?</div><div dir="auto"><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">Am 08.06.2017 10:45 nachm. schrieb "Christof Ressi" <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I totally get what Joao means, I had wondered about that myself. This problems happens for GOP patches which draw scalars on the toplevel canvas. The reclaiming doesn't work if the struct name has a $0. if you reload the abstraction, the $0 will have another value.<br>
<br>
but here's a solution: you actually don't have to draw the scalars on the toplevel canvas. you can also draw them in a subpatch with GOP enabled which you can clear without destroying your whole patch :-).<br>
<br>
> Gesendet: Donnerstag, 08. Juni 2017 um 20:48 Uhr<br>
> Von: "Miller Puckette" <<a href="mailto:msp@ucsd.edu">msp@ucsd.edu</a>><br>
> An: "João Pais" <<a href="mailto:jmmmpais@gmail.com">jmmmpais@gmail.com</a>><br>
> Cc: PD-List <<a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a>><br>
> Betreff: Re: [PD] wild structs on pd files<br>
<div class="elided-text">><br>
> Yep, if there are "data" in your patch and you remove the "struct" object<br>
> that defines them, Pd keeps teh objects around anyway, so that you can<br>
> reclaim them by reloading the "structs" later.  Put the abstractions back<br>
> in the patch (or even just load them separately) and you can see the<br>
> invisible scalars again.<br>
><br>
> There's no way to globally delete all scalars belonging to a given "struct"<br>
> except by manually editing the patch.<br>
><br>
> cheers<br>
> Miller<br>
><br>
> On Thu, Jun 08, 2017 at 08:04:58PM +0200, João Pais wrote:<br>
> > Hi again Miller,<br>
> ><br>
> > I had a question regarding structs. When editing my patches in a text<br>
> > editor, I noticed that at the top of the patch there were some "stowaway"<br>
> > structs (and scalars), which can only come from abstractions I used in the<br>
> > main patch - but these abstractions should have the structs inside them, and<br>
> > not on the main patch. Nevertheless, the main patch begins now with some #N<br>
> > struct .... lines, before the first #N canvas ... . I also noticed that if I<br>
> > delete the #N struct .... lines there won't be any (visible) problem with<br>
> > the patch.<br>
> ><br>
> > Do you know this behaviour? Is it normal, or is it an open issue that should<br>
> > be dealt with? E.g. like arrays, should scalars have a "don't save with<br>
> > patch" option?<br>
> ><br>
> > Furthermore, this brings up the subject of old data (i.e. trash) hanging<br>
> > around a patch that isn't visible to the "naked eye":<br>
> > - does this data in any way affects or conflicts with the patch?<br>
> > - does it get ignored, thrown away or rewritten at restart of the patch?<br>
> > Adding to that, I use $0-variables in my struct names, which will mean that<br>
> > in one session they will be called 1007-bla, and 1920-bla in the next one.<br>
> > - since the only way to know how many structs are saved within a patch is by<br>
> > looking at the patch code, and the only way to delete structs in Pd is<br>
> > graphically, would it make sense to add a struct-scanning and delete methods<br>
> > in [pointer], or a way to scan it by sending it a pd-canvas identifier?<br>
> > - or looking at it from another angle, since inside Pd the only way to be<br>
> > sure to clean a canvas is the send a "clear" method, would it help to<br>
> > implement a "clear-struct" method to a pd canvas? Or even "clear-struct all"<br>
> > that could be sent to the top canvas of a patch, and clean all subpatches<br>
> > recursively?<br>
> ><br>
> > Best,<br>
> ><br>
> > Joao<br>
><br>
</div>> ______________________________<wbr>_________________<br>
> <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
><br>
</blockquote></div><br></div></div></div>