title: System.OutOfMemory Exception on loading Javascript libraries
body: <p>In my application I have referenced JQWidget libraries and styles using Bundle options like below.</p>
  
  <pre><code>bundles.Add(new ScriptBundle("~/bundles/jqwidgets").Include(
                                      "~/JQWidgets/jqx-all.js",
                                      "~/JQWidgets/jqxcore.js",
                                      "~/JQWidgets/jqxdata.js",
                                      "~/JQWidgets/jqxgrid.js",
                                      "~/JQWidgets/jqxgrid.selection.js",
                                      "~/JQWidgets/jqxgrid.pager.js",
                                      "~/JQWidgets/jqxlistbox.js",
                                      "~/JQWidgets/jqxbuttons.js",
                                      "~/JQWidgets/jqxscrollbar.js",
                                      "~/JQWidgets/jqxdatatable.js",
                                      "~/JQWidgets/jqxtreegrid.js",
                                      "~/JQWidgets/jqxmenu.js",
                                      "~/JQWidgets/jqxcalendar.js",
                                      "~/JQWidgets/jqxgrid.sort.js",
                                      "~/JQWidgets/jqxgrid.filter.js",
                                      "~/JQWidgets/jqxdatetimeinput.js",
                                      "~/JQWidgets/jqxdropdownlist.js",
                                      "~/JQWidgets/jqxslider.js",
                                      "~/JQWidgets/jqxeditor.js",
                                      "~/JQWidgets/jqxinput.js",
                                      "~/JQWidgets/jqxdraw.js",
                                      "~/JQWidgets/jqxchart.core.js",
                                      "~/JQWidgets/jqxchart.rangeselector.js",
                                      "~/JQWidgets/jqxtree.js",
                                      "~/JQWidgets/globalize.js",
                                      "~/JQWidgets/jqxbulletchart.js",
                                      "~/JQWidgets/jqxcheckbox.js",
                                      "~/JQWidgets/jqxradiobutton.js",
                                      "~/JQWidgets/jqxvalidator.js",
                                      "~/JQWidgets/jqxpanel.js",
                                      "~/JQWidgets/jqxpasswordinput.js",
                                      "~/JQWidgets/jqxnumberinput.js",
                                      "~/JQWidgets/jqxcombobox.js",
                                      "~/JQWidgets/jqxgrid.edit.js",
                                      "~/JQWidgets/jqxgrid.columnsresize.js",
                                      "~/JQWidgets/jqxgrid.columnsreorder.js",
                                      "~/JQWidgets/jqxdata.js",
                                      "~/JQWidgets/jqxgrid.export.js",
                                      "~/JQWidgets/jqxdata.export.js",
                                      "~/JQWidgets/jqxgrid.grouping.js",
                                      "~/JQWidgets/jqxgrid.aggregates.js",
                                      "~/JQWidgets/jqxtabs.js",
                                      "~/JQWidgets/jqxwindow.js"
          ));
  bundles.Add(new StyleBundle("~/JQWidgets/Styles/css").Include(
                                      "~/JQWidgets/Styles/jqx.base.css",
                                      "~/JQWidgets/Styles/jqx.arctic.css",
                                      "~/JQWidgets/Styles/jqx.black.css",
                                      "~/JQWidgets/Styles/jqx.bootstrap.css",
                                      "~/JQWidgets/Styles/jqx.classic.css",
                                      "~/JQWidgets/Styles/jqx.darkblue.css",
                                      "~/JQWidgets/Styles/jqx.energyblue.css",
                                      "~/JQWidgets/Styles/jqx.fresh.css",
                                      "~/JQWidgets/Styles/jqx.highcontrast.css",
                                      "~/JQWidgets/Styles/jqx.metro.css",
                                      "~/JQWidgets/Styles/jqx.metrodark.css",
                                      "~/JQWidgets/Styles/jqx.office.css",
                                      "~/JQWidgets/Styles/jqx.orange.css",
                                      "~/JQWidgets/Styles/jqx.shinyblack.css",
                                      "~/JQWidgets/Styles/jqx.summer.css",
                                      "~/JQWidgets/Styles/jqx.web.css",
                                      "~/JQWidgets/Styles/jqx.ui-darkness.css",
                                      "~/JQWidgets/Styles/jqx.ui-lightness.css",
                                      "~/JQWidgets/Styles/jqx.ui-le-frog.css",
                                      "~/JQWidgets/Styles/jqx.ui-overcast.css",
                                      "~/JQWidgets/Styles/jqx.ui-redmond.css",
                                      "~/JQWidgets/Styles/jqx.ui-smoothness.css",
                                      "~/JQWidgets/Styles/jqx.ui-start.css",
                                      "~/JQWidgets/Styles/jqx.ui-sunny.css",
                                      "~/JQWidgets/Styles/bootstrap.css",
                                      "~/JQWidgets/Styles/site.css"
              ));
  BundleTable.EnableOptimizations = true;
  </code></pre>
  
  <p>And in my <code>_Layout.cshtml</code> I have referenced them like this in <code>head</code> and <code>body</code> tags respectively.</p>
  
  <pre><code>&lt;meta charset="utf-8" /&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;title&gt;@ViewBag.Title - Gulf Piping Company&lt;/title&gt;
  @Styles.Render("~/Content/css")
  **@Styles.Render("~/jqwidgets/styles/css")**
  @Scripts.Render("~/bundles/modernizr")
  @Scripts.Render("~/bundles/jquery")
  
  @Scripts.Render("~/bundles/jquery")
  @Scripts.Render("~/bundles/bootstrap")
  **@Scripts.Render("~/bundles/jqwidgets")**
  @Scripts.Render("~/bundles/ajax")
  @RenderSection("scripts", required: false)
  </code></pre>
  
  <p>Now, since my application is in development stage, so I keep running the application, make changes and refresh the browser as required. After certain number of refreshes (cant tell how many), i get this error message.</p>
  
  <p><a href="https://i.stack.imgur.com/A0E3C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A0E3C.png" alt="enter image description here"></a></p>
  
  <p>I have to close browser, close Visual Studio and then re run Visual studio, load solution again and then run the appliction to overcome this error. Can any one tell me what is going on here?</p>
  
  <p>Also, i have different views/pages in my application and some pages reference some of above <code>JQWidget</code> libraries and some don't (i.e. not all pages use all of these libraries), so is <code>Bundling</code> really the right way to use or there is a better way to reference libraries?</p>